...
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 name: kafka.connect:type=connector-metrics,connector=([-.\w]+)
Metric/Attribute Name | Description | Implemented |
---|
connector-type | The type of the connector, one of: source, sink | 1.0.0 |
connector-class | The name of the connector class | 1.0.0 |
connector-version | The version of the connector class, as reported by the connector in this worker | 1.0.0 |
status | The current status of the connector in this worker, one of: running, paused, stopped |
status-running | Signals whether the connector is in the running state |
status-paused | Signals whether the connector is in the paused state |
status-stopped | Signals whether the connector is in the stopped state |
Common Task Metrics
Common Task Metrics
MBean name: kafka.connect:type=connector-task-
MBean name: kafka.connect:type=task-metrics,connector=([-.\w]+),task=([-.\w]+)
Metric/Attribute Name | Description | Implemented |
---|
status | The current status of this task, one of: unassigned, running, paused, failed, destroyed |
status-unassigned | Signals whether the task is in the unassigned state |
status-running | Signals whether the task is in the running state |
status-paused | Signals whether the task is in the paused state |
status-failed | Signals whether the task is in the failed state |
status-destroyed | Signals whether the task is in the destroyed state |
pause-ratio | The fraction of time this task has spent in the paused state. |
running-ratio | The fraction of time this task has spent in the running state. |
offset-commit-success-percentage | The average percentage of this task's offset commit attempts that succeeded |
offset-commit-failure-percentage | The average percentage of this task's offset commit attempts that failed or had an error |
offset-commit-max-time-ms | The maximum time in milliseconds taken by this task to commit offsets |
offset-commit-99p-time-ms | The 99th percentile time in milliseconds spent by this task to 1.0.0 |
pause-ratio | The fraction of time this task has spent in the paused state. | 1.0.0 |
running-ratio | The fraction of time this task has spent in the running state. | 1.0.0 |
offset-commit-success-percentage | The average percentage of this task's offset commit attempts that succeeded | 1.0.0 |
offset-commit-failure-percentage | The average percentage of this task's offset commit attempts that failed or had an error | 1.0.0 |
offset-commit-max-time-ms | The maximum time in milliseconds taken by this task to commit offsets | 1.0.0 |
offset-commit-avg-time-ms | The average time in milliseconds taken by this task to commit offsets | 1.0.0 |
offset-commit-99p-time-ms | The 99th percentile time in milliseconds spent by this task to commit offsets to Kafka |
|
offset-commit-95p-time-ms | The 95th percentile time in milliseconds spent by this task to commit offsets to Kafka |
|
offset-commit-90p-time-ms | The 90th percentile time in milliseconds spent by this task to commit offsets |
commit offsets 95p 95th millisecondsspent milliseconds spent by this |
task to commit offsets task to commit offsets to Kafka |
|
offset-commit- |
90p 90th 50th percentile (average) time in |
millisecondsspent milliseconds spent by this |
task to commit task to commit offsets to Kafka |
offsetcommit-75p-size-max | The maximum size of the batches processed by the connector | 1.0.0 |
time-msThe 75th percentile time in milliseconds spent by this task to commit offsets to Kafka | offset-commit-50p-time-ms | The 50th percentile (average) time in milliseconds spent by this task to commit offsets to Kafkamax maximum average size of the batches processed by the connector |
batch-size-avg | The average size of the batches processed by the connectorSource Task Metrics
MBean name: kafka.connect:type=source-task-metrics,connector=([-.\w]+),task=([\d]+)
Metric/Attribute Name | Description | Implemented |
---|
source-record-poll-rate | The 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-total | The |
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-rate | The 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-total | The |
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 |
pollbatchmaxtime-msThe maximum time in milliseconds taken count | The most recent number of records that have been produced by this task |
to poll for a batch of source recordspoll-batch-99p-time-ms | The 99th percentile time in milliseconds spent by this task to poll for a batch of source records |
poll-batch-95p-time-ms | but not yet completely written to Kafka. | 1.0.0 |
source-record-active-count-max | The 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-avg | The average number of records that have been produced by this task but not yet completely written to Kafka. | 1.0.0 |
The 95th percentile time in milliseconds spent by this task to poll for a batch of source records90pThe 90th percentile millisecondsspent milliseconds taken by this task to poll for a batch of source records | 1.0.0 |
poll-batch- |
75pspent The 75th percentile time in milliseconds The average time in milliseconds taken by this task to poll for a batch of source records | 1.0.0 |
poll-batch- |
50p 50th (average) millisecondsspent milliseconds spent by this |
task to poll task to poll for a batch of source records |
Sink Task Metrics
MBean name: kafka.connect:type=sink-task-metrics,connector=([-.\w]+),task=([\d]+)
|
poll-batch-95p-time-ms | The 95th percentile time in milliseconds spent by this task to poll for a batch of source records |
|
poll-batch-90p-time-ms | The 90th percentile time in milliseconds spent by this task to poll for a batch of source records |
|
poll-batch-75p-time-ms | The 75th percentile time in milliseconds spent by this task to poll for a batch of source records |
|
poll-batch-50p-time-ms | The 50th percentile (average) time in milliseconds spent by this task to poll for a batch of source records |
|
Sink Task Metrics
MBean name: kafka.connect:type=sink-task-metrics,connector=([-.\w]+),task=([\d]+)
Metric/Attribute Name | Description | Implemented |
---|
sink-record-read-rate | The average per-second number of records read from Kafka for |
Metric/Attribute Name | Description |
---|
sink-record-read-rate | The 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-total | The 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. |
sink-record-send-rate | The average per-second numbrer of records output from the transformations and sent to this task belonging to the named sink connector in this worker. This is |
after before transformations are applied |
and excludes any records filtered out by the transformations.sink-record-send-total | The 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- |
lagmax maximum lag in terms of number of records behind the consumer the offset commits are for any topic partitions.partition-count | The number of topic partitions assigned to 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-no | The current sequence number for offset commits |
offset-commit-completion-rate | The average per-second number of offset commit completions that were completed successfully |
offset-commit-completion-total | The total number of offset commit completions that were completed successfully |
offset-commit-completion-skip-rate | The average per-second number of offset commit completions that were received too late and skipped/ignored |
offset-commit-completion-skip-total | The total number of offset commit completions that were received too late and skipped/ignored |
put-batch-max-time-ms | The maximum time taken by this task to put a batch of sinks records |
put-batch-99p-time-ms | The 99th percentile time in milliseconds spent by this task to put a batch of sinks records |
put-batch-95p-time-ms | The 95th percentile time in milliseconds spent by this task to put a batch of sinks records |
put-batch-90p-time-ms | The 90th percentile time in milliseconds spent by this task to put a batch of sinks records |
put-batch-75p-time-ms | The 75th percentile time in milliseconds spent by this task to put a batch of sinks records |
put-batch-50p-time-ms | The 50th percentile (average) time in milliseconds spent by this task to put a batch of sinks records |
flush-max-time-ms | The maximum time in milliseconds taken by this sink task to pre-commit/flush |
flush-99p-time-ms | The 99th percentile time in milliseconds spent by this sink task to pre-commit/flush |
flush-95p-time-ms | The 95th percentile time in milliseconds spent by this sink task to pre-commit/flush |
flush-90p-time-ms | The 90th percentile time in milliseconds spent by this sink task to pre-commit/flush |
flush-75p-time-ms | The 75th percentile time in milliseconds spent by this sink task to pre-commit/flush |
flush-50p-time-ms | The 50th percentile (average) time in milliseconds spent 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-total | The 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-max | The maximum lag in terms of number of records behind the consumer the offset commits are for any topic partitions. |
|
sink-record-active-count | The 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-max | The 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-avg | The 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-count | The number of topic partitions assigned to this task belonging to the named sink connector in this worker. | 1.0.0 |
offset-commit-seq-no | The current sequence number for offset commits | 1.0.0 |
offset-commit-completion-rate | The average per-second number of offset commit completions that were completed successfully | 1.0.0 |
offset-commit-completion-total | The total number of offset commit completions that were completed successfully | 1.0.0 |
offset-commit-skip-rate | The average per-second number of offset commit completions that were received too late and skipped/ignored | 1.0.0 |
offset-commit-skip-total | The total number of offset commit completions that were received too late and skipped/ignored | 1.0.0 |
put-batch-max-time-ms | The maximum time in milliseconds taken by this task to put a batch of sinks records | 1.0.0 |
put-batch-avg-time-ms | The average time in milliseconds taken by this task to put a batch of sinks records | 1.0.0 |
put-batch-99p-time-ms | The 99th percentile time in milliseconds spent by this task to put a batch of sinks records |
|
put-batch-95p-time-ms | The 95th percentile time in milliseconds spent by this task to put a batch of sinks records |
|
put-batch-90p-time-ms | The 90th percentile time in milliseconds spent by this task to put a batch of sinks records |
|
put-batch-75p-time-ms | The 75th percentile time in milliseconds spent by this task to put a batch of sinks records |
|
put-batch-50p-time-ms | The 50th percentile (average) time in milliseconds spent by this task to put a batch of sinks records |
|
flush-max-time-ms | The maximum time in milliseconds taken by this sink task to pre-commit/flush |
|
flush-99p-time-ms | The 99th percentile time in milliseconds spent by this sink task to pre-commit/flush |
|
flush-95p-time-ms | The 95th percentile time in milliseconds spent by this sink task to pre-commit/flush |
|
flush-90p-time-ms | The 90th percentile time in milliseconds spent by this sink task to pre-commit/flush |
|
flush-75p-time-ms | The 75th percentile time in milliseconds spent by this sink task to pre-commit/flush |
|
flush-50p-time-ms | The 50th percentile (average) time in milliseconds spent by this sink task to pre-commit/flush |
|
MBean name: kafka.connect:type=sink-task-metrics,connector=([-.\w]+),task=([\d]+),topic=([-.\w]+),partition=([\d]+)
Metric/Attribute Name | Description | Implemented |
---|
sink-record-lag | The latest lag in terms of number of records behind the consumer the offset commits are for the topic partition. |
|
sink-record-lag-avg | The average lag in terms of number of records behind the consumer the offset commits are for the topic partition. |
|
sink-record-lag-max | The maximum lag in terms of number of records behind the consumer the offset commits are for the topic partition. |
|
Worker Metrics
MBean name: kafka.connect:type=sink-task-metrics,connector=([-.\w]+),task=([\d]+),topic=([-.\w]+),partition=([\d]+)
Metric/Attribute Name | Description |
---|
sink-record-lag | The latest lag in terms of number of records behind the consumer the offset commits are for the topic partition. |
sink-record-lag-avg | The average lag in terms of number of records behind the consumer the offset commits are for the topic partition. |
sink-record-lag-max | The maximum lag in terms of number of records behind the consumer the offset commits are for the topic partition. |
Worker Metrics
MBean name: kafka.connect:type=connect-worker-metrics
connect-worker-metrics
Metric/Attribute Name | Description | Implemented |
---|
task-count | The number of tasks run in this worker | 1.0.0 |
connector-count | The number of connectors run in this worker | 1.0.0 |
connector-startup-attempts-total | The total number of connector startups that this worker has attempted. | 1.0.0 |
connector-startup-success-total | The total number of connector starts that succeeded. | 1.0.0 |
connector-startup-success-percentage | The average percentage of this worker's connectors starts that succeeded. | 1.0.0 |
connector-startup-failure-total | The total number of connector starts that failed. | 1.0.0 |
connector-startup-failure-percentage | The average percentage of this worker's connectors starts that failed. | 1.0.0 |
task-startup-attempts-total | The total number of task startups that this worker has attempted. | 1.0.0 |
task-startup-success-total | The total number of task starts that succeeded. | 1.0.0 |
task-startup-success-percentage | The average percentage of this worker's task starts that succeeded. | 1.0.0 |
task-startup-failure-total | The total number of task starts that failed. | 1.0.0 |
task-startup-failure-percentage | The average percentage of this worker's task starts that failed. | 1.0.0 |
Metric/Attribute Name | Description |
---|
task-count | The number of tasks run in this worker |
connector-count | The number of connectors run in this worker |
leader-name | The name of the group leader |
epoch | The epoch or generation number of this worker |
status | The state of this worker, one of: rebalancing, running |
status-rebalancing | Signals whether the worker is in the rebalancing state |
status-running | Signals whether the worker is in the running state |
rest-request-rate | The average per second number of requests handled by the REST endpoints in this worker |
|
rest-request-total | The total number of requests handled by the REST endpoints in this |
worker, since the was last restarted.
Worker Rebalance Metrics
MBean name: kafka.connect:type=connect-worker-rebalance-metrics
Metric/Attribute Name | Description |
---|
rebalance-success-total | The total number of this worker's successful rebalances |
rebalance-success-percentage | The average percentage of this worker's rebalances that succeeded |
rebalance-failureImplemented |
---|
leader-name | The name of the group leader | 1.0.0 |
epoch | The epoch or generation number of this worker | 1.0.0 |
completed-rebalances-total | The total number of |
this worker's failed rebalancesrebalances completed by this worker. | 1.0.0 |
rebalancing | Whether this worker is currently rebalancing. | 1.0.0 |
rebalance- |
failurepercentage average percentage of this worker's rebalances that failedmaximum time in milliseconds spent by this worker to rebalance. | 1.0.0 |
rebalance- |
max maximum time millisecondsspent milliseconds spent by this |
worker to rebalanceworker to rebalance. | 1.0.0 |
rebalance-99p-time-ms | The 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-ms | The 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-ms | The 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-ms | The 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-ms | The 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-ms | The time in |
milliseconds since milliseconds since the most recent rebalance in this worker |
task-failure-rate | The average per second number of tasks that failed in this worker |
task-failure-total | The total number of tasks that failed in this workerConfiguration
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.)
Configuration Field | Type | Default | Importance | Description |
---|
metrics.sample.window.ms | long | 30000 | low | The window of time in milliseconds a metrics sample is computed over. Must be a non-negative number. |
metrics.num.samples | int | 2 | low | The number of samples maintained to compute metrics. Must be a positive number. |
metric.reporters | string | "" | low | A list of classes to use as metrics reporters. Implementing the MetricReporter interface allows plugging in classes that will be notified of new metric creation. The JmxReporter is always included to register JMX statistics. |
metrics.recording.level | string | "INFO" | low | The highest recording level for metrics. Must be either "INFO" or "DEBUG". |
Proposed Changes
We will add the relevant metrics and worker configuration properties as specified in the Public Interfaces section.
...
Rejected Alternatives
None