add support for the jaeger propagation format

adding default, testing w3c traceparent is propagated
This commit is contained in:
Matthew Silverman 2021-03-23 19:43:34 -04:00
parent 03cf9cf59d
commit 71c8ef119d
5 changed files with 47 additions and 2 deletions

View file

@ -562,6 +562,9 @@ type Configuration struct {
// Default: nginx
JaegerServiceName string `json:"jaeger-service-name"`
// JaegerPropagationFormat specifies the traceparent/tracestate propagation format
JaegerPropagationFormat string `json:"jaeger-propagation-format"`
// JaegerSamplerType specifies the sampler to be used when sampling traces.
// The available samplers are: const, probabilistic, ratelimiting, remote
// Default: const
@ -867,6 +870,7 @@ func NewDefault() Configuration {
ZipkinServiceName: "nginx",
ZipkinSampleRate: 1.0,
JaegerCollectorPort: 6831,
JaegerPropagationFormat: "jaeger",
JaegerServiceName: "nginx",
JaegerSamplerType: "const",
JaegerSamplerParam: "1",

View file

@ -1033,6 +1033,7 @@ const zipkinTmpl = `{
const jaegerTmpl = `{
"service_name": "{{ .JaegerServiceName }}",
"propagation_format": "{{ .JaegerPropagationFormat }}",
"sampler": {
"type": "{{ .JaegerSamplerType }}",
"param": {{ .JaegerSamplerParam }},