Support OTEL exporter.headers
I was unable to find where or what generates the /etc/nginx/opentelemetry.toml as I wanted to add configuration to it. Would be great if we can support otel.exporter.otlp.headers (OTEL_EXPORTER_OTLP_HEADERS in env). This is very useful when your endpoint requires the Authorization header. Specifically for my use case I need it to ingest X-Scope-OrgID for Grafana Tempo's multi-tenancy.
This can be implemented by a new value in the ConfigMap and/or respecting the OTEL_EXPORTER_OTLP_HEADERS from the environment.
This issue is currently awaiting triage.
If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
The triage/accepted label can be added by org members by writing /triage accepted in a comment.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/assign
Another great addition would be to add k8s attributes as described in https://opentelemetry.io/blog/2022/k8s-metadata/
This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach #ingress-nginx-dev on Kubernetes Slack.
I tried getting things to work with OTEL_EXPORTER_OTLP_HEADERS by adding
main-snippet:
env OTEL_EXPORTER_OTLP_HEADERS;
to the ConfigMap and setting the env variable accordingly, like described in the docs But when inspecting the traffic to my collector/endpoint with wireshark, the headers are not set.
What am I doing wrong here?
Edit: @esigo any plans on implementing the headers functionality directly into the addon, without the need to resort to ENV?
@norman-zon unfortunately I have low capacity. Don't think if I could deliver this in the near future
No problem, just wanted to check.
Hello. Is it possible to implement OTEl headers like X-Scope-OrgID ??? Will be appreciated, thanks
/remove-lifecycle frozen This repository is heading for archival; seee https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/