-
Notifications
You must be signed in to change notification settings - Fork 873
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_consumer_commit_sync_time_ns: duplicate metric name #10289
Comments
Please provide a minimal application that reproduces the issue along with instructions needed to reproduce. |
|
What do I have to do with the test app to reproduce the issue? Do I have to run kafka? Something else? |
|
Kafka metrics are reported by both kafka clients instrumentation and spring boot actuator instrumentation. You'll have to disable one of them. Try adding |
Yes, that was actually the intention of disabling micrometer - I didn't realize that there are other ways to get spring boot related metrics. |
I would support that |
Describe the bug
I have a java spring boot project. it use spring-kafka library to send kafka message.
when I upgrade agent version from 1.x to 2.0 .
got error message in promethues exporter.
An Exception occurred while scraping metrics: java.lang.IllegalArgumentException: kafka_consumer_commit_sync_time_ns: duplicate metric name
but when I disable kafka moudule by set env
OTEL_INSTRUMENTATION_KAFKA_ENABLED=false
, it works,seems there is a confilict in
spring-kafka
andkafka-client
moudulesSteps to reproduce
create a spring boot project , add env
JAVA_TOOL_OPTIONS="-javaagent:opentelemetry-javaagent.jar";OTEL_LOGS_EXPORTER=logging;OTEL_METRICS_EXPORTER=prometheus;OTEL_TRACES_EXPORTER=jaeger ;SPRING_PROFILES_ACTIVE=local
Expected behavior
http endpiont return 200
Actual behavior
http endpiont return 500
Javaagent or library instrumentation version
2.0
Environment
JDK: 17
OS: linux
Additional context
No response
The text was updated successfully, but these errors were encountered: