envoyproxy / envoyproxy/gateway

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

オープン
#5,787 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
stale
主要言語
Go
スター
3k
フォーク
864
平均マージ
2日 2時間
マージ済み PR(30日)
140

説明

### 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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。