Skip to content

Commit bd283b3

Browse files
If noop tracer then do not return a new context with span (#774)
1 parent 19583ac commit bd283b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/propagation.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ func createOpenTracingSpan(
6767
name string,
6868
tags opentracing.Tags,
6969
) (context.Context, opentracing.Span) {
70+
if _, ok := tracer.(opentracing.NoopTracer); ok {
71+
return ctx, tracer.StartSpan("StartWorkflow-Span")
72+
}
73+
7074
var parent opentracing.SpanContext
7175
if parentSpan := opentracing.SpanFromContext(ctx); parentSpan != nil {
7276
parent = parentSpan.Context()

0 commit comments

Comments
 (0)