Kevin Lu created KAFKA-6123: ------------------------------- Summary: MetricsReporter does not get auto-generated client.id Key: KAFKA-6123 URL: https://issues.apache.org/jira/browse/KAFKA-6123 Project: Kafka Issue Type: Improvement Components: clients, metrics Affects Versions: 0.11.0.0 Reporter: Kevin Lu Priority: Minor
When a {{MetricsReporter}} is configured for a client, it will receive the user-specified configurations via {{Configurable.configure(Map<String, ?> configs)}}. Likewise, {{ProducerInterceptor}} and {{ConsumerInterceptor}} receive user-specified configurations in their configure methods. The difference is when a user does not specify the {{client.id}} field, Kafka will auto-generate client ids (producer-1, producer-2, consumer-1, consumer-2, etc). This auto-generated {{client.id}} will be passed into the interceptors' configure method, but it is not passed to the {{MetricsReporter}} configure method. This makes it harder to directly map {{MetricsReporter}} with the interceptors for the client when users do not specify the {{client.id}} field. The {{client.id}} can be determined from identifying a metric with the {{client.id}} tag, but this is hacky and requires traversal. It would be useful to have auto-generated {{client.id}} field also passed to the {{MetricsReporter}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029)