Skip to content

Commit

Permalink
Add support for providing tracing headers (ava-labs#1727)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph authored Jul 18, 2023
1 parent afcf51e commit b9355c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
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"
)

0 comments on commit b9355c1

Please sign in to comment.