Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Autoconfigure APIs #3959

Closed
radcortez opened this issue Dec 6, 2021 · 2 comments
Closed

Expose Autoconfigure APIs #3959

radcortez opened this issue Dec 6, 2021 · 2 comments
Labels
Feature Request Suggest an idea for this project

Comments

@radcortez
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Right now, to configure OpenTelemetry you either build one with OpenTelemetrySdkBuilder or use the auto-configuration one with OpenTelemetrySdkAutoConfiguration.

Describe the solution you'd like
It would be interesting if you could have something in between, where you would use the OpenTelemetrySdkBuilder combined with some of the private apis of the auto-configuration. The motivation is to be able to use all of the autoconfiguration features and configuration properties, but allow to further customize it for third-party libraries.

This could be achieved by turning io.opentelemetry.sdk.autoconfigure.TracerProviderConfiguration#configureTracerProvider into a public API and making it return the builder instead, so you could consume it. It may require exposing some other APIs as well like io.opentelemetry.sdk.autoconfigure.PropagatorConfiguration#configurePropagators.

@radcortez radcortez added the Feature Request Suggest an idea for this project label Dec 6, 2021
@anuraaga
Copy link
Contributor

anuraaga commented Dec 6, 2021

@radcortez We've added an auto configuration builder recently which is meant for this use case, a library that uses autoconfiguration but with full customization of the auto configuration. It's used in the maven extension for example

https://github.com/open-telemetry/opentelemetry-java-contrib/blob/main/maven-extension/src/main/java/io/opentelemetry/maven/OpenTelemetrySdkService.java#L85

Would this work for you?

@radcortez
Copy link
Contributor Author

@anuraaga sorry, I didn't notice this before. I was only looking into the released versions.

It should help. I'll explore the new API and see if something is missing. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

2 participants