diff --git a/pkg/infra/tracing/test_helper.go b/pkg/infra/tracing/test_helper.go index 5981fe7d6a8..8d4511d6655 100644 --- a/pkg/infra/tracing/test_helper.go +++ b/pkg/infra/tracing/test_helper.go @@ -92,7 +92,7 @@ func (t *FakeSpan) AddEvents(keys []string, values []EventValue) { } } -func (t *FakeSpan) contextWithSpan(ctx context.Context) context.Context { +func (t *FakeSpan) ContextWithSpan(ctx context.Context) context.Context { return ctx } diff --git a/pkg/infra/tracing/tracing.go b/pkg/infra/tracing/tracing.go index 800cc97f645..66e4a2969fb 100644 --- a/pkg/infra/tracing/tracing.go +++ b/pkg/infra/tracing/tracing.go @@ -128,7 +128,7 @@ type Span interface { // contextWithSpan returns a context.Context that holds the parent // context plus a reference to this span. - contextWithSpan(ctx context.Context) context.Context + ContextWithSpan(ctx context.Context) context.Context } func ProvideService(cfg *setting.Cfg) (Tracer, error) { @@ -188,7 +188,7 @@ func SpanFromContext(ctx context.Context) Span { // It is the equivalent of opentracing.ContextWithSpan and trace.ContextWithSpan. func ContextWithSpan(ctx context.Context, span Span) context.Context { if span != nil { - return span.contextWithSpan(ctx) + return span.ContextWithSpan(ctx) } return ctx } @@ -487,7 +487,7 @@ func (s OpentelemetrySpan) AddEvents(keys []string, values []EventValue) { } } -func (s OpentelemetrySpan) contextWithSpan(ctx context.Context) context.Context { +func (s OpentelemetrySpan) ContextWithSpan(ctx context.Context) context.Context { if s.span != nil { ctx = trace.ContextWithSpan(ctx, s.span) // Grafana also manages its own separate traceID in the context in addition to what opentracing handles.