...
By convention, pre-defined metric context fields that are guaranteed to be present would be prefixed with an underscore.
Proposed Changes
Remove the special status of JmxReporter
Existing usages of JmxReporter(String prefix)
will be removed and replaced with the default constructor, in line with what we do for metric reporter plugins defined via configuration.
...
All components and libraries currently instantiating metrics reporters will define the necessary metric context and add the _namespace
field to the metrics context.
Client and Streams libraries
In addition to the above, clients and streams libraries will read in additional metrics.context.<field>=<value>
entries passed in via configurationand add them to the metric context before calling contextChange(MetricsContext metricsContext)
.
Kafka Brokers
Kafka brokers will pass in fully resolved fields kafka.broker.id
and kafka.cluster.id
to the metric context.
Connect Workers
Connect workers will pass in connect.kafka.cluster.id
to indicate the Kafka cluster used in distributed mode, as well as connect.group.id
to indicate the group id used for worker coordination, and also propagate this information to the its clients.
...