From 56eddfed5e359b876f4d86fcdfaa49eec2eda171 Mon Sep 17 00:00:00 2001 From: Oscar Reyes Date: Fri, 13 Sep 2024 11:24:49 -0600 Subject: [PATCH] adding tracestate to trigger context --- models/propagator.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/propagator.go b/models/propagator.go index 005b6ba..ee05b04 100644 --- a/models/propagator.go +++ b/models/propagator.go @@ -73,11 +73,14 @@ func (p Propagator) getTextMapPropagator() propagation.TextMapPropagator { func NewSpanContext(traceID string) trace.SpanContext { parsedTraceID, _ := trace.TraceIDFromHex(traceID) + tracestate, _ := trace.ParseTraceState("tracetest=true") + var tf trace.TraceFlags return trace.NewSpanContext(trace.SpanContextConfig{ TraceID: parsedTraceID, SpanID: utils.SpanID(), TraceFlags: tf.WithSampled(true), + TraceState: tracestate, Remote: true, }) }