Skip to content

Commit

Permalink
Merge pull request #4569 from mkabischev/jaeger-header-configuration
Browse files Browse the repository at this point in the history
allow to configure jaeger header names
  • Loading branch information
k8s-ci-robot authored Sep 18, 2019
2 parents 04a32f6 + d5563a7 commit 87ad033
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 1 deletion.
20 changes: 20 additions & 0 deletions docs/user-guide/nginx-configuration/configmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ The following table shows a configuration option's name, type, and the default v
|[jaeger-sampler-param](#jaeger-sampler-param)|string|"1"|
|[jaeger-sampler-host](#jaeger-sampler-host)|string|"http://127.0.0.1"|
|[jaeger-sampler-port](#jaeger-sampler-port)|int|5778|
|[jaeger-trace-context-header-name](#jaeger-trace-context-header-name)|string|uber-trace-id|
|[jaeger-debug-header](#jaeger-debug-header)|string|uber-debug-id|
|[jaeger-baggage-header](#jaeger-baggage-header)|string|jaeger-baggage|
|[jaeger-trace-baggage-header-prefix](#jaeger-trace-baggage-header-prefix)|string|uberctx-|
|[main-snippet](#main-snippet)|string|""|
|[http-snippet](#http-snippet)|string|""|
|[server-snippet](#server-snippet)|string|""|
Expand Down Expand Up @@ -747,6 +751,22 @@ Leave blank to use default value (localhost). _**default:**_ http://127.0.0.1

Specifies the custom remote sampler port to be passed to the sampler constructor. Must be a number. _**default:**_ 5778

## jaeger-trace-context-header-name

Specifies the header name used for passing trace context. _**default:**_ uber-trace-id

## jaeger-debug-header

Specifies the header name used for force sampling. _**default:**_ jaeger-debug-id

## jaeger-baggage-header

Specifies the header name used to submit baggage if there is no root span. _**default:**_ jaeger-baggage

## jaeger-tracer-baggage-header-prefix

Specifies the header prefix used to propagate baggage. _**default:**_ uberctx-

## main-snippet

Adds custom configuration to the main section of the nginx configuration.
Expand Down
12 changes: 12 additions & 0 deletions docs/user-guide/third-party-addons/opentracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ jaeger-sampler-host
# Specifies the custom remote sampler port to be passed to the sampler constructor. Must be a number. Default: 5778
jaeger-sampler-port
# Specifies the header name used for passing trace context. Must be a string. Default: uber-trace-id
jaeger-trace-context-header-name
# Specifies the header name used for force sampling. Must be a string. Default: jaeger-debug-id
jaeger-debug-header
# Specifies the header name used to submit baggage if there is no root span. Must be a string. Default: jaeger-baggage
jaeger-baggage-header
# Specifies the header prefix used to propagate baggage. Must be a string. Default: uberctx-
jaeger-tracer-baggage-header-prefix
# specifies the port to use when uploading traces, Default 8126
datadog-collector-port
Expand Down
16 changes: 16 additions & 0 deletions internal/ingress/controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,22 @@ type Configuration struct {
// Default: 5778
JaegerSamplerPort int `json:"jaeger-sampler-port"`

// JaegerTraceContextHeaderName specifies the header name used for passing trace context
// Default: uber-trace-id
JaegerTraceContextHeaderName string `json:"jaeger-trace-context-header-name"`

// JaegerDebugHeader specifies the header name used for force sampling
// Default: jaeger-debug-id
JaegerDebugHeader string `json:"jaeger-debug-header"`

// JaegerBaggageHeader specifies the header name used to submit baggage if there is no root span
// Default: jaeger-baggage
JaegerBaggageHeader string `json:"jaeger-baggage-header"`

// TraceBaggageHeaderPrefix specifies the header prefix used to propagate baggage
// Default: uberctx-
JaegerTraceBaggageHeaderPrefix string `json:"jaeger-tracer-baggage-header-prefix"`

// DatadogCollectorHost specifies the datadog agent host to use when uploading traces
DatadogCollectorHost string `json:"datadog-collector-host"`

Expand Down
8 changes: 7 additions & 1 deletion internal/ingress/controller/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,13 @@ const jaegerTmpl = `{
},
"reporter": {
"localAgentHostPort": "{{ .JaegerCollectorHost }}:{{ .JaegerCollectorPort }}"
}
},
"headers": {
"TraceContextHeaderName": "{{ .JaegerTraceContextHeaderName }}",
"jaegerDebugHeader": "{{ .JaegerDebugHeader }}",
"jaegerBaggageHeader": "{{ .JaegerBaggageHeader }}",
"traceBaggageHeaderPrefix": "{{ .JaegerTraceBaggageHeaderPrefix }}"
},
}`

const datadogTmpl = `{
Expand Down

0 comments on commit 87ad033

Please sign in to comment.