@@ -84,6 +84,7 @@ func (t *tracerImpl) Options() interceptor.TracerOptions {
8484 HeaderKey : headerKey ,
8585 DisableSignalTracing : t .opts .DisableSignalTracing ,
8686 DisableQueryTracing : t .opts .DisableQueryTracing ,
87+ DisableUpdateTracing : t .opts .DisableUpdateTracing ,
8788 }
8889}
8990
@@ -103,7 +104,11 @@ func (t *tracerImpl) UnmarshalSpan(m map[string]string) (interceptor.TracerSpanR
103104
104105func (t * tracerImpl ) MarshalSpan (span interceptor.TracerSpan ) (map [string ]string , error ) {
105106 carrier := tracer.TextMapCarrier {}
106- if err := tracer .Inject (span .(* tracerSpan ).Context (), carrier ); err != nil {
107+ tSpan , ok := span .(* tracerSpan )
108+ if ! ok {
109+ return nil , fmt .Errorf ("expected *tracerSpan, got %T" , span )
110+ }
111+ if err := tracer .Inject (tSpan .Context (), & carrier ); err != nil {
107112 return nil , err
108113 }
109114 return carrier , nil
@@ -118,7 +123,11 @@ func (t *tracerImpl) SpanFromContext(ctx context.Context) interceptor.TracerSpan
118123}
119124
120125func (t * tracerImpl ) ContextWithSpan (ctx context.Context , span interceptor.TracerSpan ) context.Context {
121- return tracer .ContextWithSpan (ctx , span .(* tracerSpan ).Span )
126+ tSpan , ok := span .(* tracerSpan )
127+ if ! ok {
128+ return ctx
129+ }
130+ return tracer .ContextWithSpan (ctx , tSpan .Span )
122131}
123132
124133// SpanFromWorkflowContext extracts the DataDog Span object from the workflow context.
@@ -182,7 +191,7 @@ func (t *tracerImpl) StartSpan(options *interceptor.TracerStartSpanOptions) (int
182191 for k , v := range options .Tags {
183192 // TODO when custom span support is added we might have to revisit this
184193 // Display Temporal tags in a nested group in Datadog APM
185- tagKey := "temporal." + strings .TrimPrefix (k , "temporal" )
194+ tagKey := fmt . Sprintf ( "temporal.%s" , strings .TrimPrefix (k , "temporal." ) )
186195 startOpts = append (startOpts , tracer .Tag (tagKey , v ))
187196 }
188197
0 commit comments