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

Improve Metrics Integration with Prometheus Reporter #587

Open
yjiao-5028 opened this issue Aug 16, 2022 · 0 comments
Open

Improve Metrics Integration with Prometheus Reporter #587

yjiao-5028 opened this issue Aug 16, 2022 · 0 comments
Labels
status: next major version The issue will be considered for the next major version status: pr submitted A pull request has been submitted for the issue type: enhancement New feature or request

Comments

@yjiao-5028
Copy link

Feature description

Currently micronaut-kafka doesn't integrate with promethus metrics registry well. There are kafka metrics records-consumed-total with same name but different collection level (e.g., application, or topic, or partition level): https://docs.confluent.io/platform/current/kafka/monitoring.html#topic-level-fetch-metrics and https://github.com/apache/kafka/blob/39a555ba94a6a5d851b31e0a7f07e19c48327835/clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java#L1744-L1768

However for prometheus metric reporter, it will compare tag signature with same metric names, and discard if mismatch. https://github.com/micrometer-metrics/micrometer/blob/b53e6e9327e58289d49b980ffde7e21c90a44983/implementations/micrometer-registry-prometheus/src/main/java/io/micrometer/prometheus/PrometheusMeterRegistry.java#L551-L564. So for prometheus users, 1) current value of records-consumed-total is inaccurate as it contains values from all collection levels, and 2) inconvenience to include more tags than default client-id.

Here is a draft solution: #586. The idea is to prepend tag names to differentiate metric at different levels.

@graemerocher graemerocher added type: enhancement New feature or request status: pr submitted A pull request has been submitted for the issue status: next major version The issue will be considered for the next major version labels Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: next major version The issue will be considered for the next major version status: pr submitted A pull request has been submitted for the issue type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants