-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] add support for sending headers to tracing system #3604
base: main
Are you sure you want to change the base?
Conversation
@@ -31,6 +31,11 @@ tracing-transport: "grpc" | |||
# 默认值: "" | |||
tracing-endpoint: "" | |||
|
|||
# TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: help would be appreciated here for a proper translation.
Oh this looks interesting! :) |
e69716f
to
1e4fd0b
Compare
1e4fd0b
to
ee5bc14
Compare
I actually wonder if we shouldn't just tell people to use the OTLP environment variables instead. Otherwise we're going to have to add configuration options over time for anything the SDK already supports. For example, you could set those values already with I'm not entirely sure where to draw the line with this. Realistically, we can remove the |
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" ```
Maps are currently not supported in environment variables. See also spf13/viper#339
``` go run ./internal/config/gen/ -out ./internal/config/helpers.gen.go ```
a18573b
to
6c013c2
Compare
Description
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:
Example with Honeycomb:
refs #1230
See also https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/[email protected]#WithHeaders.
Checklist
Please put an x inside each checkbox to indicate that you've read and followed it:
[ ]
->[x]
If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).
go fmt ./...
andgolangci-lint run
.