ingress-nginx icon indicating copy to clipboard operation
ingress-nginx copied to clipboard

Support OTEL exporter.headers

Open sjoukedv opened this issue 2 years ago • 9 comments

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.

sjoukedv avatar Aug 17 '23 14:08 sjoukedv

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.

k8s-ci-robot avatar Aug 17 '23 14:08 k8s-ci-robot

/assign

esigo avatar Aug 17 '23 14:08 esigo

Another great addition would be to add k8s attributes as described in https://opentelemetry.io/blog/2022/k8s-metadata/

sjoukedv avatar Aug 19 '23 15:08 sjoukedv

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.

github-actions[bot] avatar Sep 19 '23 01:09 github-actions[bot]

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 avatar Mar 06 '24 10:03 norman-zon

@norman-zon unfortunately I have low capacity. Don't think if I could deliver this in the near future

esigo avatar Mar 06 '24 16:03 esigo

No problem, just wanted to check.

norman-zon avatar Mar 07 '24 07:03 norman-zon

Hello. Is it possible to implement OTEl headers like X-Scope-OrgID ??? Will be appreciated, thanks

dolefirenko avatar Dec 09 '24 15:12 dolefirenko

/remove-lifecycle frozen This repository is heading for archival; seee https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/

lmktfy avatar Nov 29 '25 18:11 lmktfy