From 1bfee2186b6a0cc18228113b8f373246fb1a8d14 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Fri, 13 Mar 2026 21:18:47 -0500 Subject: [PATCH] add payload type to span attributes --- internal/route/route.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/route/route.go b/internal/route/route.go index cf6be43..680a1f4 100644 --- a/internal/route/route.go +++ b/internal/route/route.go @@ -49,7 +49,7 @@ func (r *Route) Input() string { func (r *Route) ProcessPayload(ctx context.Context, payload any) (any, error) { tracer := otel.Tracer("route") - processCtx, processSpan := tracer.Start(ctx, "ProcessPayload") + processCtx, processSpan := tracer.Start(ctx, "ProcessPayload", trace.WithAttributes(attribute.String("payload.type", fmt.Sprintf("%T", payload)))) defer processSpan.End() for processorIndex, processor := range r.processors { processorCtx, processorSpan := otel.Tracer("processor").Start(processCtx, "process", trace.WithAttributes(attribute.Int("processor.index", processorIndex), attribute.String("processor.type", processor.Type())))