open-telemetry / open-telemetry/opentelemetry-java
Make `AutoConfiguredOpenTelemetrySdk`'s `resource` and `config` readable
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 58
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
configlike the exporters - Actual
resourcelikeservice.nameandservice.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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating AutoConfiguredOpenTelemetrySdk and the internal AutoConfigureUtil methods getResource(), getConfig(), and getStructuredConfig(). Review the linked integration use cases and pull-request discussion, then verify that read-only access exposes the loaded resource and configuration without reflection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100