From b5a8eac8c9b2fb93fa74f5f66de3ae6c4f386d68 Mon Sep 17 00:00:00 2001 From: vgnanasekaran Date: Thu, 1 Feb 2024 09:39:26 -0800 Subject: [PATCH] Added http route to client attributes --- pkg/internal/export/otel/metrics.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/internal/export/otel/metrics.go b/pkg/internal/export/otel/metrics.go index 03075cca8..1aa348e2c 100644 --- a/pkg/internal/export/otel/metrics.go +++ b/pkg/internal/export/otel/metrics.go @@ -346,6 +346,9 @@ func (mr *MetricsReporter) httpClientAttributes(span *request.Span) []attribute. attrs = append(attrs, ServerAddr(span.Host)) attrs = append(attrs, ServerPort(span.HostPort)) } + if span.Route != "" { + attrs = append(attrs, semconv.HTTPRoute(span.Route)) + } return attrs }