Description
Is your feature request related to a problem? Please describe.
Authors of OpenTelemetry integrations like the OpenTelemetry Maven Extension and the Jenkins OpenTelemetry Plugin are interested in read-only access to the config
and resource
loaded by the AutoConfiguredOpenTelemetrySdk
during the build()
creation method in order to ease troubleshooting and finding produced traces & metrics showing users the noteworthy
- Actual
config
like the exporters - Actual
resource
likeservice.name
andservice.namespace
Describe the solution you'd like
Accessors to resource
and config
.
A solution to access the config
is already available with i.o.s.autoconfigure.internal.AutoConfigureUtil#getConfig() | getStructuredConfig()
.
I imagined:
- Either introduce
AutoConfigureUtil#getResource()
- Or make
#getResource()
,getConfig()
, andgetStructuredConfig()
public onAutoConfiguredOpenTelemetrySdk
This use cas is discussed with @SylvainJuge on
Describe alternatives you've considered
Today we rely on Java reflection in the Jenkisn OTel Plugin: https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1434/files#diff-d2ce824d3b67fe3fe10a6aee588ea13e40a93d71743dc2982e2fc1d3ae797b0f
Additional context