-
I am a little bit new on java with Opentelemetry, but I would like to know if you could help me with a problem that I am facing. I am trying to instrument my springboot application, that is running on gke, with Opentelemetry sending metrics to GCP. I added to my POM opentelemetry-spring-boot-starter, and everything works correctly, but only with traces! I would like to have JVM metrics also, like heap, gc, threads, etc. I thought it would be sent by default, but it is not working. I tried to enable JMX, but also didn't work. I found some documentation showing that would be possible to instrument using opentelemetry-jxm-metrics-gathere, (https://github.com/open-telemetry/opentelemetry-java-contrib/blob/main/jmx-metrics/README.md) but it means another sidecar fetching the data and I don't understand why the current opentelemetry-spring-boot-starter can't do this by itself? Anybody faced this issue before? or enabled the JVM metrics only using opentelemetry-spring-boot-starter? Thank you very much for any help. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Spring starter does not currently include these metrics. You'll have to configure them yourself, see https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/runtime-telemetry/runtime-telemetry-java8/library |
Beta Was this translation helpful? Give feedback.
-
it's actually an omission - the idea is that you should have the same telemetry as with the agent (where possible) |
Beta Was this translation helpful? Give feedback.
-
created #12812 to add the feature |
Beta Was this translation helpful? Give feedback.
-
An atlernative solution from Java 17 and based on JFR: https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/runtime-telemetry/runtime-telemetry-java17/library |
Beta Was this translation helpful? Give feedback.
Spring starter does not currently include these metrics. You'll have to configure them yourself, see https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/runtime-telemetry/runtime-telemetry-java8/library