envoyproxy / envoyproxy/gateway

Is it possible to set headers in the telemetry metrics sink?

Open
#5,787 1 comment 0 reactions 0 assignees View on GitHub
stale
Dominant language
Go
Stars
3k
Forks
864
Avg merge
2d 2h
Merged PRs (30d)
140

Description

### Discussed in https://github.com/envoyproxy/gateway/discussions/5785

Originally posted by **seanankenbruck** April 21, 2025
I am running Envoy proxy in an environment where my opentelemetry collector requires the header `X-Scope-OrgId` to route metrics data to the appropriate tenant. In the [documentation ](https://gateway.envoyproxy.io/docs/tasks/observability/proxy-metric/), it is not clear if you can set custom headers on the sink definition. For access logs and tracing, it seems like this is possible but for my purposes I would need to set the header on metrics as well.

From the Envoy Gatewy docs, the sample is shown below:

```yaml
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: eg
namespace: envoy-gateway-system
spec:
gatewayClassName: eg
infrastructure:
parametersRef:
group: gateway.envoyproxy.io
kind: EnvoyProxy
name: otel-sink
listeners:
- name: http
protocol: HTTP
port: 80
---
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: otel-sink
namespace: envoy-gateway-system
spec:
telemetry:
metrics:
sinks:
- type: OpenTelemetry
openTelemetry:
host: otel-collector.monitoring.svc.cluster.local
port: 4317

```

Is it possible to set a custom header in this sink definition?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.