Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This KIP proposes a plan to remove the current special behavior of the JMX Reporter and treat it like all other reporters. In order to do so, we will introduce a new configuration to all components (broker, producer, consumer, admin, connect and streams) to disable JMXReporter. This new configuration is expected to serve as a temporary measure until the next major release when JMXReporter will only be enabled if it's included in metric.reporters.

Proposed Changes

1) A new configuration setting:

Name: auto.include.jmx.reporter

...

When set to false, components will not instantiate a JMXReporter and only reporters set via metric.reporters will be used.
When set to true, a warning will be printed to indicate this setting is deprecated and recommend using metric.reporters instead.


2) From Kafka 4.0, metric.reporters will have its default value set to org.apache.kafka.common.metrics.JMXReporter

Compatibility, Deprecation, and Migration Plan

...

  • auto.include.jmx.reporter will be removed
  • metric.reporters will have its default value set to org.apache.kafka.common.metrics.JMXReporter
  • only reporters listed in metric.reporters will be enabled

Users currently relying on JMXReporter and that are using additional reporters via metric.reporters will have to include org.apache.kafka.common.metrics.JMXReporter in metric.reporters.

Rejected Alternatives

  • Immediately change the default value of metric.reporters to include JMXReporter. This would avoid creating a new configuration but this would cause a change of behavior for users that already set metric.reporters.
  • Add a new configuration to disable the JMX Reporter. The drawback of this approach was the permanent addition of a new configuration. The current proposal only adds a new configuration that will be removed in next major release.