Description
Is your feature request related to a problem? Please describe.
As a adopter of OpenTelemetry it's hard to navigate the documentation and weigh the trade-offs of how to integrate instrumentation for Spring Boot apps.
This comment on #12878 poses 3 options #12878 (comment)
-
Instrumentation in Spring Boot (Micrometer), configured to export via OTLP
- no autoconfiguration
- no OTel agent autoinstrumentation of client libraries
- this recent blog post https://spring.io/blog/2024/10/28/lets-use-opentelemetry-with-spring feels 'off' IMO. OpenTelemetry isn't OTLP.
- The telemetry exported doesn't follow OTel's semantic conventions.
- You'll get data to your o11y platform, but data may not be immediately usable if the platform expects semconv compatibility.
- This also puts more complication into your otel-collector configuration to handle these non-semconv instruments along with streams of data from semconv-compliant apps.
-
OpenTelemetry Spring Boot Starter
- autoconfiguration matching the otel spec
- missing some autoinstrumentation of the agent?
- contrasting this option against the otel agent in the docs about what's missing
-
OpenTelemetry Java Agent
- autoconfiguration matching the otel spec
- autoinstrumentation
- semconv compatibility
- you can enable export Micrometer metrics.
- If you do enable it, you should disable runtime-telemetry instrumentation. And, there are other weird problems in the export of some instruments. for example, I ran into this recently -- the http.server.requests Micrometer histogram metric gets exported without any buckets micrometer http.server.requests metric breaks metrics UI with IndexOutOfRangeException dotnet/aspire#6962
- bubbling up these other config flags for micrometer export would be nice, and clarifying the docs on in what circumstances they should be toggled on https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/micrometer/micrometer-1.5/javaagent/README.md
Describe the solution you'd like
I really like this recent blog post putting the starter into context, and its section on when to use the starter -- https://opentelemetry.io/blog/2024/spring-starter-stable/
Describe alternatives you've considered
No response
Additional context
My organization runs 1100+ apps on Kubernetes and VMs. 80%+ of those applications are JVM + Spring Boot apps; the remaining are Node.js, Go, Python, or are non-Spring JVM apps (Quarkus, KTor, http4k, or otherwise).
Organizationally, we see huge benefits from OpenTelemetry:
- OTel SDKs following the configuration spec mean all our apps can be configured similarly to export telemetry to our otel-collector infrastructor.
- OTel SDKs following semantic conventions mean the telemetry from all our apps is similar when it lands at the observability platform.
But, our heavy investment in Spring Boot also means that when most dev teams look up telemetry docs and advice from the Spring Community, they can find conflicting directions. Understanding the trade-offs in interoperability isn't easy.