From c2234b1601dd0e018769e1396d710a52ec64845e Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Thu, 26 Nov 2020 13:46:23 -0500 Subject: [PATCH] fixes Signed-off-by: Yuri Shkuro --- config/config.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index bd0a1812..165754b2 100644 --- a/config/config.go +++ b/config/config.go @@ -48,7 +48,7 @@ type Configuration struct { // Value can be provided by FromEnv() via the environment variable named JAEGER_RPC_METRICS RPCMetrics bool `yaml:"rpc_metrics"` - // Gen128Bit isntructs the tracer to generate 128-bit wide trace IDs, compatible with W3C Trace Context. + // Gen128Bit instructs the tracer to generate 128-bit wide trace IDs, compatible with W3C Trace Context. // Value can be provided by FromEnv() via the environment variable named JAEGER_TRACEID_128BIT. Gen128Bit bool `yaml:"traceid_128bit"` @@ -272,8 +272,9 @@ func (c Configuration) NewTracer(options ...Option) (opentracing.Tracer, io.Clos jaeger.TracerOptions.MaxTagValueLength(opts.maxTagValueLength), jaeger.TracerOptions.NoDebugFlagOnForcedSampling(opts.noDebugFlagOnForcedSampling), } + if c.Gen128Bit || opts.gen128Bit { - tracerOptions = append(tracerOptions, jaeger.TracerOptions.Gen128Bit(opts.gen128Bit)) + tracerOptions = append(tracerOptions, jaeger.TracerOptions.Gen128Bit(true)) } for _, tag := range opts.tags {