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

[OTel]: Spin should support OTEL_EXPORTER_OTLP_HEADERS #2880

Closed
ThorstenHans opened this issue Oct 9, 2024 · 4 comments
Closed

[OTel]: Spin should support OTEL_EXPORTER_OTLP_HEADERS #2880

ThorstenHans opened this issue Oct 9, 2024 · 4 comments

Comments

@ThorstenHans
Copy link
Contributor

Having support for OTEL_EXPORTER_OTLP_HEADERS could unlock several scenarios. For example, we could support OTLP exporters that require header based authentication.

Spin should allow users to specify individual headers that will be used when emitting traces, logs, or metrics.

If the OTEL_EXPORTER_OTLP_HEADERS environment variable is present, Spin should configure outgoing headers on both TonicExporterBuilder and HttpExporterBuilder using the with_headers function

(see https://docs.rs/opentelemetry-otlp/0.26.0/opentelemetry_otlp/struct.HttpExporterBuilder.html#method.with_headers for example)

More about OTEL_EXPORTER_OTLP_HEADERS:

https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/#otel_exporter_otlp_headers

@ThorstenHans
Copy link
Contributor Author

This has already been requested by @endocrimes in #2816

@lann
Copy link
Collaborator

lann commented Oct 9, 2024

Have you tried setting this env var already? The otel library we use appears to already support it (from a very brief code review).

@endocrimes
Copy link
Member

#2857 it looks like it should work now

@ThorstenHans
Copy link
Contributor Author

yep. Can confirm that it works 👍🏻

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

3 participants