I've configured Spring boot actuator and micrometer for exposing Kafka consumer metrics. Some of the Kafka metrics don't have 'topic' label. For example,
kafka_consumer_records_consumed_total_records_total{client_id="consumer-1",topic="topic1",} 0.0
kafka_consumer_records_consumed_total_records_total{client_id="consumer-2",topic="topic2",} 0.0
kafka_consumer_records_consumed_total_records_total{client_id="consumer-3",topic="topic3",} 0.0
kafka_consumer_commit_latency_max_seconds{client_id="consumer-1",} 0.013
kafka_consumer_commit_latency_max_seconds{client_id="consumer-2",} 0.013
kafka_consumer_commit_latency_max_seconds{client_id="consumer-3",} 0.013
My question is
Is there any configuration required to show 'topic' label for metric kafka_consumer_commit_latency_max_seconds?
I noticed that client_id="consumer-1" is same for topic="topic1" even after application restart. Can I rely on client_id to be always point to the specific topic?