-
Notifications
You must be signed in to change notification settings - Fork 981
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
Add support for KafkaProducerMetrics (similar to KafkaConsumerMetrics) #1095
Comments
If no objections, I'd like to work on this improvement. |
Sounds great. Part of the reason we started with consumer metrics is the tagging is difficult to figure out sometimes. It's possible it will be easier for producer side metrics. See the lengthy discussion on #878 for how to infer partition tags. The Kafka docs at least are highly questionable on this feature, so I recommend implementing off of what you see in JMX. |
@OleksiiBondar Please check the PR #1166 to fix the consumer metrics. Have you started on this yet? I can support you on this if you want. |
@larsduelfer I've started implementing ProducerMetrics using JMX (similar to Consumer) but as a part of discussion #512 (comment) it was suggested to use more native way (using |
I can try helping here with this implementation. But after reading the linked issues and discussions it's still not clear to me which is the final decision. JMX or implementing MetricsReporter directly? |
…ort-for-kafka' into micrometer-metrics#1095-add-support-for-kafka # Conflicts: # micrometer-core/src/main/java/io/micrometer/core/instrument/binder/kafka/KafkaClientMetrics.java
…ort-for-kafka' into micrometer-metrics#1095-add-support-for-kafka # Conflicts: # build.gradle # gradle/wrapper/gradle-wrapper.properties # micrometer-core/src/main/java/io/micrometer/core/instrument/binder/kafka/KafkaClientMetrics.java
I think the MetricsReporter route would be better going forward. #1173 is open with an implementation of this, but we have a couple things to figure out before we can merge it still. Feel free to take a look and help out. |
Hi, does it mean that to merge this PR, it requires #1173 to be merged first? Is there any branch already contains the change for this PR but just keeps unmerged? Thanks! |
That is the current thinking. At least the approach taken by it is the direction we want to go moving forward.
No, there isn't any branch with the changes yet. |
Status? |
Provides a replacement for the `KafkaConsumerMetrics` binder (uses JMX) - `KafkaClientMetrics` and `KafkaStreamsMetrics` binders based off metrics provided by the Kafka client API. This allows all metrics provided by the client to be registered as Micrometer metrics, with the caveat that metrics with the same name but less tags will not be registered. For some metrics, Kafka provides a total metric and one broken down by things like topic and partition. Micrometer will opt to register the most specific ones. Resolves #1095 Resolves #1096
Thank you everyone for the interest in this. This has been implemented by #1835 as an incubating feature in 1.4 (see the |
It would be great to publish Kafka producer metrics which already available through JMX beans.
List of attribute names - https://docs.confluent.io/current/kafka/monitoring.html#producer-metrics
The text was updated successfully, but these errors were encountered: