From 0897f083898220c0389049fe56945ffda494f03c Mon Sep 17 00:00:00 2001 From: jonny rhea Date: Wed, 7 Jan 2026 18:36:53 -0600 Subject: [PATCH] removed fast path in startSpan --- internal/telemetry/telemetry.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/internal/telemetry/telemetry.go b/internal/telemetry/telemetry.go index b1b4eddc96..b7dfb485ba 100644 --- a/internal/telemetry/telemetry.go +++ b/internal/telemetry/telemetry.go @@ -59,11 +59,6 @@ func StartServerSpan(ctx context.Context, tracer trace.Tracer, rpc RPCInfo, othe trace.WithSpanKind(trace.SpanKindServer), ) - // Fast path: noop provider or span not sampled - if !span.IsRecording() { - return ctx, func(error) { span.End() } - } - // Define required attributes attrs := []Attribute{ semconv.RPCSystemKey.String(rpc.System), @@ -112,11 +107,7 @@ func startSpan( trace.WithSpanKind(trace.SpanKindInternal), ) - // Fast path - if !span.IsRecording() { - return ctx, span, func(error) { span.End() } - } - + // Set attributes if any are provided if len(attributes) > 0 { span.SetAttributes(attributes...) }