From 336cfc62c7dc0103cc1c940bda98523d2881b77c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E6=80=9D?= Date: Tue, 7 Jan 2025 14:42:19 +0800 Subject: [PATCH 1/4] polish metrics name --- pkg/rules/fasthttp/fasthttp_otel_instrumenter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/rules/fasthttp/fasthttp_otel_instrumenter.go b/pkg/rules/fasthttp/fasthttp_otel_instrumenter.go index adc10339..2e299c5b 100644 --- a/pkg/rules/fasthttp/fasthttp_otel_instrumenter.go +++ b/pkg/rules/fasthttp/fasthttp_otel_instrumenter.go @@ -196,7 +196,7 @@ func BuildFastHttpClientOtelInstrumenter() *instrumenter.PropagatingToDownstream networkExtractor := net.NetworkAttrsExtractor[fastHttpRequest, fastHttpResponse, fastHttpClientAttrsGetter]{Getter: clientGetter} return builder.Init().SetSpanStatusExtractor(http.HttpClientSpanStatusExtractor[fastHttpRequest, fastHttpResponse]{Getter: clientGetter}).SetSpanNameExtractor(&http.HttpClientSpanNameExtractor[fastHttpRequest, fastHttpResponse]{Getter: clientGetter}). SetSpanKindExtractor(&instrumenter.AlwaysClientExtractor[fastHttpRequest]{}). - AddOperationListeners(http.HttpClientMetrics("fasthttp.client")). + AddOperationListeners(http.HttpClientMetrics("fasthttp.server")). SetInstrumentationScope(instrumentation.Scope{ Name: utils.FAST_HTTP_CLIENT_SCOPE_NAME, Version: version.Tag, @@ -213,7 +213,7 @@ func BuildFastHttpServerOtelInstrumenter() *instrumenter.PropagatingFromUpstream urlExtractor := net.UrlAttrsExtractor[fastHttpRequest, fastHttpResponse, fastHttpServerAttrsGetter]{Getter: serverGetter} return builder.Init().SetSpanStatusExtractor(http.HttpServerSpanStatusExtractor[fastHttpRequest, fastHttpResponse]{Getter: serverGetter}).SetSpanNameExtractor(&http.HttpServerSpanNameExtractor[fastHttpRequest, fastHttpResponse]{Getter: serverGetter}). SetSpanKindExtractor(&instrumenter.AlwaysServerExtractor[fastHttpRequest]{}). - AddOperationListeners(http.HttpClientMetrics("fasthttp.server")). + AddOperationListeners(http.HttpClientMetrics("fasthttp.client")). SetInstrumentationScope(instrumentation.Scope{ Name: utils.FAST_HTTP_SERVER_SCOPE_NAME, Version: version.Tag, From 3e5758d1c7b542667083c142069369f69bc66ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E6=80=9D?= Date: Tue, 7 Jan 2025 15:03:44 +0800 Subject: [PATCH 2/4] update fiber version --- pkg/data/default.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/data/default.json b/pkg/data/default.json index 81a11ee7..a80f1cb7 100644 --- a/pkg/data/default.json +++ b/pkg/data/default.json @@ -588,7 +588,7 @@ "Path": "github.com/alibaba/opentelemetry-go-auto-instrumentation/pkg/rules/elasticsearch" }, { - "Version": "[2.43.0,2.52.6)", + "Version": "[2.43.0,2.52.7)", "ImportPath": "github.com/gofiber/fiber/v2", "Function": "handler", "ReceiverType": "*App", From ab48358acf31f15c4887f3d282011ba4130f911d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E6=80=9D?= Date: Tue, 7 Jan 2025 16:55:56 +0800 Subject: [PATCH 3/4] fix fast http metrics --- pkg/rules/fasthttp/fasthttp_otel_instrumenter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/rules/fasthttp/fasthttp_otel_instrumenter.go b/pkg/rules/fasthttp/fasthttp_otel_instrumenter.go index 2e299c5b..f8ea8d77 100644 --- a/pkg/rules/fasthttp/fasthttp_otel_instrumenter.go +++ b/pkg/rules/fasthttp/fasthttp_otel_instrumenter.go @@ -196,7 +196,7 @@ func BuildFastHttpClientOtelInstrumenter() *instrumenter.PropagatingToDownstream networkExtractor := net.NetworkAttrsExtractor[fastHttpRequest, fastHttpResponse, fastHttpClientAttrsGetter]{Getter: clientGetter} return builder.Init().SetSpanStatusExtractor(http.HttpClientSpanStatusExtractor[fastHttpRequest, fastHttpResponse]{Getter: clientGetter}).SetSpanNameExtractor(&http.HttpClientSpanNameExtractor[fastHttpRequest, fastHttpResponse]{Getter: clientGetter}). SetSpanKindExtractor(&instrumenter.AlwaysClientExtractor[fastHttpRequest]{}). - AddOperationListeners(http.HttpClientMetrics("fasthttp.server")). + AddOperationListeners(http.HttpClientMetrics("fasthttp.client")). SetInstrumentationScope(instrumentation.Scope{ Name: utils.FAST_HTTP_CLIENT_SCOPE_NAME, Version: version.Tag, @@ -213,7 +213,7 @@ func BuildFastHttpServerOtelInstrumenter() *instrumenter.PropagatingFromUpstream urlExtractor := net.UrlAttrsExtractor[fastHttpRequest, fastHttpResponse, fastHttpServerAttrsGetter]{Getter: serverGetter} return builder.Init().SetSpanStatusExtractor(http.HttpServerSpanStatusExtractor[fastHttpRequest, fastHttpResponse]{Getter: serverGetter}).SetSpanNameExtractor(&http.HttpServerSpanNameExtractor[fastHttpRequest, fastHttpResponse]{Getter: serverGetter}). SetSpanKindExtractor(&instrumenter.AlwaysServerExtractor[fastHttpRequest]{}). - AddOperationListeners(http.HttpClientMetrics("fasthttp.client")). + AddOperationListeners(http.HttpServerMetrics("fasthttp.server")). SetInstrumentationScope(instrumentation.Scope{ Name: utils.FAST_HTTP_SERVER_SCOPE_NAME, Version: version.Tag, From 05b036570f42f3348bb4b4e1a52382c6e35fffd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E6=80=9D?= Date: Tue, 7 Jan 2025 17:49:52 +0800 Subject: [PATCH 4/4] update tag --- pkg/inst-api/version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/inst-api/version/version.go b/pkg/inst-api/version/version.go index 887e840b..27a22128 100644 --- a/pkg/inst-api/version/version.go +++ b/pkg/inst-api/version/version.go @@ -15,4 +15,4 @@ package version // Tag specifies the current release tag. It needs to be manually updated. -var Tag = "v0.4.0" +var Tag = "v0.7.0"