Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated the KIP to reflect what was implemented

...

All of the following will be added via Kafka's metrics library like most of the metrics in the Kafka brokers and other components. The context of all metrics are limited to the worker where the metrics are being reported, and all metrics are defined as attributes on the specified MBean attribute and are measured within the context of a single worker. All metrics defined below are at the INFO recording level.

Connector Metrics

MBean namekafka.connect:type=connector-metrics,connector=([-.\w]+)

 

Metric/Attribute Name

Description

Implemented
connector-typeThe type of the connector, one of: source, sink1.0.0
connector-classThe name of the connector class1.0.0
connector-versionThe version of the connector class, as reported by the connector in this worker1.0.0
statusThe current status of the connector in this worker, one of: running, paused, stopped 
status-runningSignals whether the connector is in the running state
status-pausedSignals whether the connector is in the paused state
status-stoppedSignals whether the connector is in the stopped state

Common Task Metrics

1.0.0

Common Task Metrics

MBean namekafka.connect:type=task-metricsMBean namekafka.connect:type=task-metrics,connector=([-.\w]+),task=([-.\w]+)

The 50th percentile (average) time in milliseconds spent by this task to commit offsets to Kafka

Metric/Attribute Name

Description

Implemented
statusThe current status of this task, one of: unassigned, running, paused, failed, destroyed
status-unassignedSignals whether the task is in the unassigned state
status-runningSignals whether the task is in the running state
status-pausedSignals whether the task is in the paused state
status-failedSignals whether the task is in the failed state
status-destroyedSignals whether the task is in the destroyed state
pause-ratioThe fraction of time this task has spent in the paused state.
running-ratioThe fraction of time this task has spent in the running state.
offset-commit-success-percentageThe average percentage of this task's offset commit attempts that succeeded
offset-commit-failure-percentageThe average percentage of this task's offset commit attempts that failed or had an error
offset-commit-max-time-msThe maximum time in milliseconds taken by this task to commit offsets
offset-commit-99p-time-msThe 99th percentile time in milliseconds spent by this task to commit offsets to Kafka
offset-commit-95p-time-msThe 95th percentile time in milliseconds spent by this task to commit offsets to Kafka
offset-commit-90p-time-msThe 90th percentile time in milliseconds spent by this task to commit offsets to Kafka
offset-commit-75p-time-msThe 75th percentile time in milliseconds spent by this task to commit offsets to Kafka
1.0.0
pause-ratioThe fraction of time this task has spent in the paused state.1.0.0
running-ratioThe fraction of time this task has spent in the running state.1.0.0
offset-commit-success-percentageThe average percentage of this task's offset commit attempts that succeeded1.0.0
offset-commit-failure-percentageThe average percentage of this task's offset commit attempts that failed or had an error1.0.0
offset-commit-max-time-msThe maximum time in milliseconds taken by this task to commit offsets1.0.0
offset-commit-avg-time-msThe average time in milliseconds taken by this task to commit offsets1.0.0
offset-commit-99p-time-msThe 99th percentile time in milliseconds spent by this task to commit offsets to Kafka 
offset-commit-95p-time-msThe 95th percentile time in milliseconds spent by this task to commit offsets to Kafka 
offset-commit-90p-time-msThe 90th percentile time in milliseconds spent by this task to commit offsets to Kafka 
offset-commit-75p-time-msThe 75th percentile time in milliseconds spent by this task to commit offsets to Kafka 
offset-commit-50p-time-msThe 50th percentile (average) time in milliseconds spent by this task to commit offsets to Kafka offset-commit-50p-time-ms
batch-size-maxThe maximum size of the batches processed by the connector1.0.0
batchbatch-size-avgThe average size of the batches processed by the connector1.0.0

Source Task Metrics

MBean namekafka.connect:type=source-task-metrics,connector=([-.\w]+),task=([\d]+)

Metric/Attribute NameDescriptionImplemented
source-record-poll-rateThe average per-second number of records produced/polled (before transformation) by this task belonging to the named source connector in this worker.1.0.0
source-record-poll-totalThe
total
number of records produced/polled (before transformation) by this task belonging to the named source connector in this worker, since the task was last restarted.1.0.0
source-record-write-rateThe average per-second number of records output from the transformations and written to Kafka for this task belonging to the named source connector in this worker. This is after transformations are applied and excludes any records filtered out by the transformations.1.0.0
source-record-write-totalThe
total
number of records output from the transformations and written to Kafka for this task belonging to the named source connector in this worker, since the task was last restarted.1.0.0
poll
source-
batch
record-
max
active-
time-msThe maximum time in milliseconds taken
countThe most recent number of records that have been produced by this task
to poll for a batch of source recordspoll-batch-99p-time-msThe 99th percentile time in milliseconds spent by this task to poll for a batch of source recordspoll-batch-95p-time-ms
but not yet completely written to Kafka.1.0.0
source-record-active-count-maxThe maximum number of records that have been produced by this task but not yet completely written to Kafka.1.0.0
source-record-active-count-avgThe average number of records that have been produced by this task but not yet completely written to Kafka.1.0.0
poll-batch-max-time-msThe maximum time in milliseconds taken
The 95th percentile time in milliseconds spent
by this task to poll for a batch of source records1.0.0
poll-batch-
90pspent
avg-time-ms
The 90th percentile time in milliseconds
The average time in milliseconds taken by this task to poll for a batch of source records1.0.0
poll-batch-
75p
99p-time-msThe
75th
99th percentile time in
millisecondsspent
milliseconds spent by this
task to poll
task to poll for a batch of source records 
poll-batch-
50p
95p-time-msThe
50th
95th percentile
(average)
time in
millisecondsspent
milliseconds spent by this
task to poll
task to poll for a batch of source records 

Sink Task Metrics

MBean namekafka.connect:type=sink-task-metrics,connector=([-.\w]+),task=([\d]+)

poll-batch-90p-time-msThe 90th percentile time in milliseconds spent by this task to poll for a batch of source records 
poll-batch-75p-time-msThe 75th percentile time in milliseconds spent by this task to poll for a batch of source records 
poll-batch-50p-time-msThe 50th percentile (average) time in milliseconds spent by this task to poll for a batch of source records 


Sink Task Metrics

MBean namekafka.connect:type=sink-task-metrics,connector=([-.\w]+),task=([\d]+)

sink-record-send numbrer output from the transformations and sent to this after and excludes any records filtered out by the transformations.lagmax maximum lag in terms of number of records behind the consumer the offset commits are for any topic partitions.flush milliseconds spent by this sink task to pre-commit/flushflush milliseconds spent by this sink task to pre-commit/flushflush milliseconds spent by this sink task to pre-commit/flushflush milliseconds spent by this sink task to pre-commit/flushflush milliseconds spent by this sink task to pre-commit/flush

Metric/Attribute Name

Description

Implemented
sink-record-read
Metric/Attribute NameDescription
sink-record-read-rateThe average per-second number of records read from Kafka (before transformations are applied) for this task belonging to the named sink connector in this worker.
sink-record-read-totalThe total number of records read from Kafka (before transformations are applied) for this task belonging to the named sink connector in this worker, since the task was last restarted.
-rateThe average per-second number of records read from Kafka for this task belonging to the named sink connector in this worker. This is before transformations are applied.1.0.0
sink-record-sendread-totalThe total number of records output from the transformations and sent to produced/polled (before transformation) by this task belonging to the named sink source connector in this worker, since the task was last restarted.1.0.0
sink-record-send-rateThe partition-countThe number of topic partitions assigned average per-second numbrer of records output from the transformations and sent to this task belonging to the named sink connector in this worker.
offset-commit-seq-noThe current sequence number for offset commits
offset-commit-completion-rateThe average per-second number of offset commit completions that were completed successfully
offset-commit-completion-totalThe total number of offset commit completions that were completed successfully
offset-commit-completion-skip-rateThe average per-second number of offset commit completions that were received too late and skipped/ignored
offset-commit-completion-skip-totalThe total number of offset commit completions that were received too late and skipped/ignored
put-batch-max-time-msThe maximum time taken by this task to put a batch of sinks records
put-batch-99p-time-msThe 99th percentile time in milliseconds spent by this task to put a batch of sinks records
put-batch-95p-time-msThe 95th percentile time in milliseconds spent by this task to put a batch of sinks records
put-batch-90p-time-msThe 90th percentile time in milliseconds spent by this task to put a batch of sinks records
put-batch-75p-time-msThe 75th percentile time in milliseconds spent by this task to put a batch of sinks records
put-batch-50p-time-msThe 50th percentile (average) time in milliseconds spent by this task to put a batch of sinks records
flush-max-time-msThe maximum time in milliseconds taken by this sink task to pre-commit/flush
. This is after transformations are applied and excludes any records filtered out by the transformations.1.0.0
sink-record-send-totalThe total number of records output from the transformations and sent to this task belonging to the named source connector in this worker, since the task was last restarted.1.0.0
sink-record-lag-maxThe maximum lag in terms of number of records behind the consumer the offset commits are for any topic partitions. 
sink-record-active-countThe most recent number of records that have been read from Kafka but not yet completely committed/flushed/acknowledged by the sink task.1.0.0
sink-record-active-count-maxThe maximum number of records that have been read from Kafka but not yet completely committed/flushed/acknowledged by the sink task.1.0.0
sink-record-active-count-avgThe average number of records that have been read from Kafka but not yet completely committed/flushed/acknowledged by the sink task.1.0.0
partition-countThe number of topic partitions assigned to this task belonging to the named sink connector in this worker.1.0.0
offset-commit-seq-noThe current sequence number for offset commits1.0.0
offset-commit-completion-rateThe average per-second number of offset commit completions that were completed successfully1.0.0
offset-commit-completion-totalThe total number of offset commit completions that were completed successfully1.0.0
offset-commit-skip-rateThe average per-second number of offset commit completions that were received too late and skipped/ignored1.0.0
offset-commit-skip-totalThe total number of offset commit completions that were received too late and skipped/ignored1.0.0
put-batch-max-time-msThe maximum time in milliseconds taken by this task to put a batch of sinks records1.0.0
put-batch-avg-time-msThe average time in milliseconds taken by this task to put a batch of sinks records1.0.0
put-batch-99p-time-msThe 99th percentile time in milliseconds spent by this task to put a batch of sinks records 
put-batch-95p-time-msThe 95th percentile time in milliseconds spent by this task to put a batch of sinks records 
put-batch-90p-time-msThe 90th percentile time in milliseconds spent by this task to put a batch of sinks records 
put-batch-75p-time-msThe 75th percentile time in milliseconds spent by this task to put a batch of sinks records 
put-batch-50p-time-msThe 50th percentile (average) time in

MBean namekafka.connect:type=sink-task-metrics,connector=([-.\w]+),task=([\d]+),topic=([-.\w]+),partition=([\d]+)

Metric/Attribute NameDescription
sink-record-lagThe latest lag in terms of number of records behind the consumer the offset commits are for the topic partition.
sink-record-lag-avgThe average lag in terms of number of records behind the consumer the offset commits are for the topic partition.
sink-record-lag-maxThe maximum lag in terms of number of records behind the consumer the offset commits are for the topic partition.

Worker Metrics

MBean namekafka.connect:type=connect-worker-metrics

milliseconds spent by this task to put a batch of sinks records 
flush-max-time-msThe maximum time in milliseconds taken by this sink task to pre-commit/flush 
flush-99p-time-msThe 99th percentile time in milliseconds spent by this sink task to pre-commit/flush 
flush-95p-time-msThe 95th percentile time in milliseconds spent by this sink task to pre-commit/flush 
flush-90p-time-msThe 90th percentile time in milliseconds spent by this sink task to pre-commit/flush 
flush-75p-time-msThe 75th percentile time in milliseconds spent by this sink task to pre-commit/flush 
flush-50p-time-msThe 50th percentile (average) time in milliseconds spent by this sink task to pre-commit/flush 


MBean namekafka.connect:type=sink-task-metrics,connector=([-.\w]+),task=([\d]+),topic=([-.\w]+),partition=([\d]+)

Metric/Attribute Name

Description

Implemented
sink-record-lagThe latest lag in terms of number of records behind the consumer the offset commits are for the topic partition. 
sink-record-lag-avgThe average lag in terms of number of records behind the consumer the offset commits are for the topic partition. 
sink-record-lag-maxThe maximum lag in terms of number of records behind the consumer the offset commits are for the topic partition. 

Worker Metrics

MBean namekafka.connect:type=connect-worker-metrics

Metric/Attribute Name

Description

Implemented

task-count

The number of tasks run in this worker1.0.0
connector-countThe number of connectors run in this worker1.0.0
connector-startup-attempts-totalThe total number of connector startups that this worker has attempted.1.0.0
connector-startup-success-totalThe total number of connector starts that succeeded.1.0.0
connector-startup-success-percentageThe average percentage of this worker's connectors starts that succeeded.1.0.0
connector-startup-failure-totalThe total number of connector starts that failed.1.0.0
connector-startup-failure-percentageThe average percentage of this worker's connectors starts that failed.1.0.0
task-startup-attempts-totalThe total number of task startups that this worker has attempted.1.0.0
task-startup-success-totalThe total number of task starts that succeeded.1.0.0
task-startup-success-percentageThe average percentage of this worker's task starts that succeeded.1.0.0
task-startup-failure-totalThe total number of task starts that failed.1.0.0
task-startup-failure-percentageThe average percentage of this worker's task starts that failed.1.0.0
Metric/Attribute NameDescription

task-count

The number of tasks run in this worker
connector-countThe number of connectors run in this worker
leader-nameThe name of the group leader
epochThe epoch or generation number of this worker
statusThe state of this worker, one of: rebalancing, running
status-rebalancingSignals whether the worker is in the rebalancing state
status-runningSignals whether the worker is in the running state
rest-request-rateThe average per second number of requests handled by the REST endpoints in this worker 
rest-request-totalThe total number of requests handled by the REST endpoints in this worker, since the worker was last restarted. 


Worker Rebalance Metrics

MBean namekafka.connect:type=connect-worker-rebalance-metrics

/Attribute Name

Metric/Attribute Name

Description

Implemented
leader-nameThe name of the group leader1.0.0
epochThe epoch or generation number of this worker1.0.0
completed-rebalances-totalThe total number of rebalances completed by this worker.1.0.0
rebalancingWhether this worker is currently rebalancing.1.0.0
rebalance-max-time-msThe maximum time in milliseconds spent by this worker to rebalance.1.0.0
rebalance-avg
Description
rebalance-success-totalThe total number of this worker's successful rebalances
rebalance-success-percentageThe average percentage of this worker's rebalances that succeeded
rebalance-failure-totalThe total number of this worker's failed rebalances
rebalance-failure-percentageThe average percentage of this worker's rebalances that failed
rebalance-max-time-msThe maximum time average time in millisecondsspent milliseconds spent by this worker to rebalanceworker to rebalance.1.0.0
rebalance-99p-time-msThe 99th percentile time in millisecondsspent milliseconds spent by this worker to rebalance during worker to rebalance during the last window (defaults to an hour) 
rebalance-95p-time-msThe 95th percentile time in millisecondsspent milliseconds spent by this worker to rebalance during worker to rebalance during the last window (defaults to an hour) 
rebalance-90p-time-msThe 90th percentile time in millisecondsspent milliseconds spent by this worker to rebalance during worker to rebalance during the last window (defaults to an hour) 
rebalance-75p-time-msThe 75th percentile time in millisecondsspent milliseconds spent by this worker to rebalance during worker to rebalance during the last window (defaults to an hour) 
rebalance-50p-time-msThe 50th percentile (average) time in millisecondsspent milliseconds spent by this worker to rebalance during worker to rebalance during the last window (defaults to an hour) 
time-ms-since-last-rebalance-msThe time in milliseconds since milliseconds since the most recent rebalance in this worker
task-failure-rateThe average per second number of tasks that failed in this worker
task-failure-totalThe total number of tasks that failed in this worker1.0.0

Configuration

The distributed and standalone worker configuration files will support the following properties. These exactly match the producer and consumer configurations of the same name. (The first three are already in the distributed worker configuration.)

...