Context
With the recent extraction of PyroscopeOtelSpanProcessor to the lib/ module (PR #9), it's now straightforward to support the library-based integration in Spring Boot projects using spring-boot-starter-opentelemetry, which is the spring boot approach for sending metrics, traces and logs to opentelemetry endpoints.
Problem
Currently, Spring Boot applications using spring-boot-starter-opentelemetry don't have first-class integration with Pyroscope. Users must manually wire the PyroscopeOtelSpanProcessor bean.
Solution
A new Spring Boot AutoConfiguration starter that:
- Conditionally registers
PyroscopeOtelSpanProcessor as a bean when io.opentelemetry.sdk.trace.SpanProcessor, io.otel.pyroscope.PyroscopeOtelSpanProcessor, and io.pyroscope.javaagent.PyroscopeAgent are on the classpath
- Optionally starts the Pyroscope agent if not already running
- Provides Spring configuration properties (
otel.pyroscope.*)
I've successfully tested this approach in a reference implementation. The integration works seamlessly with minimal setup.
Proposed Contribution
I'd like to contribute this as a new otel-spring-boot-starter/ submodule (similar to how lib/ and otel-extension/ are organized). Would you be open for such a contribution?
Context
With the recent extraction of
PyroscopeOtelSpanProcessorto thelib/module (PR #9), it's now straightforward to support the library-based integration in Spring Boot projects usingspring-boot-starter-opentelemetry, which is the spring boot approach for sending metrics, traces and logs to opentelemetry endpoints.Problem
Currently, Spring Boot applications using
spring-boot-starter-opentelemetrydon't have first-class integration with Pyroscope. Users must manually wire thePyroscopeOtelSpanProcessorbean.Solution
A new Spring Boot AutoConfiguration starter that:
PyroscopeOtelSpanProcessoras a bean whenio.opentelemetry.sdk.trace.SpanProcessor,io.otel.pyroscope.PyroscopeOtelSpanProcessor, andio.pyroscope.javaagent.PyroscopeAgentare on the classpathotel.pyroscope.*)I've successfully tested this approach in a reference implementation. The integration works seamlessly with minimal setup.
Proposed Contribution
I'd like to contribute this as a new
otel-spring-boot-starter/submodule (similar to howlib/andotel-extension/are organized). Would you be open for such a contribution?