Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafka Streams metrics for tasks and threads etc, are not being exposed correctly #1099

Open
davidgammon-mettle opened this issue Nov 1, 2024 · 0 comments

Comments

@davidgammon-mettle
Copy link

davidgammon-mettle commented Nov 1, 2024

Expected Behavior

I should be able to see distinct metrics for something like process-rate for threads and tasks etc. For example:

  • kafka-streams.thread.process-rate
  • kafka-streams.task.process-rate

Actual Behaviour

There is only a single metric for process-rate:

  • kafka-streams.process-rate

It looks like it is being overwritten by the last metric to be registered (or possibly the first).

Steps To Reproduce

  1. All
  2. Kafka Streams metrics enabled
  3. Run application an view Kafka Streams metrics
  4. Only a single metric exists

Specifically it's an issue with this line of code. The name is not unique and needs to include the group in some form. For example:
name = kafkaMetric.metricName().group() + "." + kafkaMetric.metricName().name();

This results in these metrics (some further parsing maybe required to normalise):

  1. kafka-streams.stream-processor-node-metrics.process-rate
  2. kafka-streams.stream-task-metrics.process-rate
  3. kafka-streams.stream-thread-metrics.process-rate

Environment Information

NA

Example Application

No response

Version

5.7.0

@davidgammon-mettle davidgammon-mettle changed the title Kafka Streams metrics for tasks, threads, consumers etc, are not being exposed corrently Kafka Streams metrics for tasks nad threads etc, are not being exposed correctly Nov 1, 2024
@davidgammon-mettle davidgammon-mettle changed the title Kafka Streams metrics for tasks nad threads etc, are not being exposed correctly Kafka Streams metrics for tasks and threads etc, are not being exposed correctly Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant