Skip to content
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

Add support for providing tracing headers #1727

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ func getTraceConfig(v *viper.Viper) (trace.Config, error) {
Type: exporterType,
Endpoint: endpoint,
Insecure: v.GetBool(TracingInsecureKey),
// TODO add support for headers
Headers: v.GetStringMapString(TracingHeadersKey),
},
Enabled: true,
TraceSampleRate: v.GetFloat64(TracingSampleRateKey),
Expand Down
1 change: 1 addition & 0 deletions config/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ func addNodeFlags(fs *pflag.FlagSet) {
fs.String(TracingEndpointKey, "localhost:4317", "The endpoint to send trace data to")
fs.Bool(TracingInsecureKey, true, "If true, don't use TLS when sending trace data")
fs.Float64(TracingSampleRateKey, 0.1, "The fraction of traces to sample. If >= 1, always sample. If <= 0, never sample")
fs.StringToString(TracingHeadersKey, map[string]string{}, "The headers to provide the trace indexer")
// TODO add flag to take in headers to send from exporter
}

Expand Down
1 change: 1 addition & 0 deletions config/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,5 @@ const (
TracingInsecureKey = "tracing-insecure"
TracingSampleRateKey = "tracing-sample-rate"
TracingExporterTypeKey = "tracing-exporter-type"
TracingHeadersKey = "tracing-headers"
)