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

WARN io.opentelemetry.sdk.metrics.internal.state.MetricStorageRegistry - Found duplicate metric definition: jvm.threads.states #271

Open
esara opened this issue May 24, 2022 · 0 comments · May be fixed by #273

Comments

@esara
Copy link
Contributor

esara commented May 24, 2022

due to a known issue in opentelemetry 1.14.0 with springboot java applications, we are hitting it in the shipping service

$ oc logs -f -n otel-shop otel-shop-shipping-5b99f8459c-xf44t 
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[main] INFO io.opentelemetry.javaagent.tooling.VersionLogger - opentelemetry-javaagent - version: 1.14.0

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.7.0)

2022-05-24 11:47:42.475  INFO 1 --- [           main] c.i.r.s.ShippingServiceApplication       : Starting ShippingServiceApplication v0.1.149 using Java 18.0.1.1 on otel-shop-shipping-5b99f8459c-xf44t with PID 1 (/opt/shipping/shipping.jar started by root in /opt/shipping)
2022-05-24 11:47:42.493  INFO 1 --- [           main] c.i.r.s.ShippingServiceApplication       : No active profile set, falling back to 1 default profile: "default"
2022-05-24 11:47:50.680  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-05-24 11:47:50.904  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 209 ms. Found 2 JPA repository interfaces.
2022-05-24 11:47:53.076  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'shippingServiceApplication' of type [com.instana.robotshop.shipping.ShippingServiceApplication$$EnhancerBySpringCGLIB$$41b10b5a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-05-24 11:47:55.596  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2022-05-24 11:47:55.886  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-05-24 11:47:55.886  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.63]
2022-05-24 11:47:56.389  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-05-24 11:47:56.403  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 13313 ms
2022-05-24 11:47:57.482  INFO 1 --- [           main] c.instana.robotshop.shipping.JpaConfig   : jdbc url jdbc:mysql://otel-shop-mysql/cities?useSSL=false&autoReconnect=true&allowPublicKeyRetrieval=True
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

[main] WARN io.opentelemetry.sdk.metrics.internal.state.MetricStorageRegistry - Found duplicate metric definition: jvm.threads.states
	at unknown source
		To enable better debugging, run your JVM with -Dotel.experimental.sdk.metrics.debug=true
Causes
- Description [The current number of threads having RUNNABLE state] does not match [The current number of threads having NEW state]
- InstrumentDescription [The current number of threads having RUNNABLE state] does not match [The current number of threads having NEW state]
Original instrument registered with same name but is incompatible.
	at unknown source
		To enable better debugging, run your JVM with -Dotel.experimental.sdk.metrics.debug=true

this is caused by open-telemetry/opentelemetry-java#4381
which is fixed in 1.14.1 (not yet released) by open-telemetry/opentelemetry-java#4457

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

Successfully merging a pull request may close this issue.

1 participant