Skip to content

Commit

Permalink
add jaeger propagator
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeynabRezaei committed Apr 13, 2024
1 parent 848ba00 commit 3928edb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion internal/tracing/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/contrib/propagators/autoprop"
"go.opentelemetry.io/contrib/propagators/jaeger"

)

Expand Down Expand Up @@ -65,7 +66,13 @@ func SetTracingProvider(provider string, samplingRatio float64, timeout float64)
)
cerberusTracer = tp.Tracer(CerberusTracerName)

otel.SetTextMapPropagator(autoprop.NewTextMapPropagator())
otel.SetTextMapPropagator(
autoprop.NewTextMapPropagator(
propagation.TraceContext{},
propagation.Baggage{},
jaeger.Jaeger{},
),
)

return nil
}
Expand Down

0 comments on commit 3928edb

Please sign in to comment.