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

Investigate improvements for configuration of endpoint URL and headers #145

Open
stevejgordon opened this issue Aug 29, 2024 · 0 comments
Open

Comments

@stevejgordon
Copy link
Contributor

AFAIK, the only way (except for in code) to configure the OtlpExporter endpoint and headers is to use the OTel environment variables OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS. I've not yet fully investigated how these are configured in the vanilla SDK, but from an initial docs review, this seems to be the case.

Since we already bind options from IConfiguration, in that scenario, it would be nice if we could simplify the configuration experience and read in the endpoint and headers from additional configuration keys under the Elastic:OpenTelemetry section. An advantage is a consistent configuration experience if using IConfiguration. Additionally, user secrets can be employed in development as well.

We should investigate further and see if we should consider adding this to provide additional value in the distro. We could also have upstream discussions about this to see if there are any thoughts on supporting general IConfiguration sections. Right now, it seems that when IConfiguration is used in the vanilla SDK, it's only used to ready keys that match the OTEL_ environment variables.

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

No branches or pull requests

1 participant