Versions Compared

Key

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

...

Currently all Kafka components that support Metrics Reporters always inject JMXReporterJmxReporter. While it's possible to include/exclude metrics the JMXReporter JmxReporter exposes (via metrics.jmx.include/exclude settings) this reporter can't be disabled and as it is not controlled via the metric.reporters configuration like other reporters.

...

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 JMXReporterJmxReporter. This new configuration is expected to serve as a temporary measure until the next major release when JMXReporter JmxReporter will only be enabled if it's included in metric.reporters.

...

Description: Deprecated. Whether to automatically include JMX Reporter even if it's not listed in metric.reporters. This configuration will be removed in Kafka 4.0, users should instead include org.apache.kafka.common.metrics.JMXReporter JmxReporter in metric.reporters in order to enable the JMX Reporter.

...

When set to false, components will not instantiate a JMXReporter JmxReporter and only reporters set via metric.reporters will be used.
When explicitly set to true or when using the default and not including JMXReporter JmxReporter in metric.reporters, 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.JMXReporterJmxReporter

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.JMXReporterJmxReporter
  • only reporters listed in metric.reporters will be enabled

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

Rejected Alternatives

  • Immediately change the default value of metric.reporters to include JMXReporterJmxReporter. 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.