[feature] add support for sending headers to tracing system

Add support for sending additional HTTP or gRPC headers which
can be used for authentication or other additional information
for the tracing system without having to set up a local instance
of the OpenTelemetry Collector to add these headers.

Example with Dash0:

```yaml
tracing-enabled: false
tracing-transport: "grpc"
tracing-endpoint: "ingress.eu-west-1.aws.dash0.com:4317"
tracing-headers:
  "Authorization": "Bearer DASH0_AUTH_TOKEN"
  "Dash0-Dataset": "gotosocial"
```

Example with Honeycomb:

```yaml
tracing-enabled: false
tracing-transport: "grpc"
tracing-endpoint: "api.honeycomb.io:443"
tracing-headers:
  "x-honeycomb-team": "YOUR_API_KEY"
  "x-honeycomb-dataset": "YOUR_DATASET"
```
This commit is contained in:
Jochen Schalanda 2024-12-07 23:35:27 +01:00
commit 56204cc2f4
9 changed files with 48 additions and 4 deletions

View file

@ -928,6 +928,13 @@ tracing-transport: "grpc"
# Default: ""
tracing-endpoint: ""
# Map of strings. Additional headers to send to the trace ingester.
# Additional HTTP or gRPC headers can be used for authentication or other additional
# information for the tracing system.
# Examples: {"Authorization": "Bearer super-secret-token", "Dataset": "gotosocial"}
# Default: {}
tracing-headers: {}
# Bool. Disable TLS for the gRPC and HTTP transport protocols.
# Default: false
tracing-insecure-transport: false