From 488a298ff445f6df9199d7dc7e5bc16b7bb84aa0 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Mon, 23 Sep 2024 15:41:03 +0200 Subject: [PATCH 1/8] disallow sdk use in instrumentations --- .golangci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 8e9802c9284..35955931eee 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -75,6 +75,14 @@ issues: linters-settings: depguard: rules: + no-sdk-instrumentation: + files: + - "**/*/instrumentation/**/*.go" + - "!**/*test/*.go" + - "!**/*example/*.go" + deny: + - pkg: go.opentelemetry.io/otel/sdk + desc: "Instrumentations should not use the SDKs, except in test or example modules" non-tests: files: - "!$test" From afef99d8939ea8b8a74de89ed1eb5e89758b4be9 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Mon, 23 Sep 2024 15:43:43 +0200 Subject: [PATCH 2/8] allow xrayconfig to use the sdk --- .../aws/aws-lambda-go/otellambda/xrayconfig/xrayconfig.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/xrayconfig.go b/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/xrayconfig.go index 9b9bdcce74e..9c31f5a157c 100644 --- a/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/xrayconfig.go +++ b/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/xrayconfig.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/contrib/propagators/aws/xray" "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" "go.opentelemetry.io/otel/propagation" - sdktrace "go.opentelemetry.io/otel/sdk/trace" + sdktrace "go.opentelemetry.io/otel/sdk/trace" //nolint:depguard // NewTracerProvider requires the SDK ) func xrayEventToCarrier([]byte) propagation.TextMapCarrier { From f8833ec4d61b34713f4f6f3bdfc6c5b37c0447c2 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Mon, 23 Sep 2024 15:43:51 +0200 Subject: [PATCH 3/8] move otelrestful sdk test --- .../emicklei/go-restful/otelrestful/go.mod | 3 - .../emicklei/go-restful/otelrestful/go.sum | 6 - .../go-restful/otelrestful/restful_test.go | 145 ------------------ .../otelrestful/test/restful_test.go | 144 +++++++++++++++++ 4 files changed, 144 insertions(+), 154 deletions(-) diff --git a/instrumentation/github.com/emicklei/go-restful/otelrestful/go.mod b/instrumentation/github.com/emicklei/go-restful/otelrestful/go.mod index 0f5d81a6177..8fcfac44558 100644 --- a/instrumentation/github.com/emicklei/go-restful/otelrestful/go.mod +++ b/instrumentation/github.com/emicklei/go-restful/otelrestful/go.mod @@ -9,7 +9,6 @@ require ( github.com/stretchr/testify v1.9.0 go.opentelemetry.io/contrib/propagators/b3 v1.30.0 go.opentelemetry.io/otel v1.30.0 - go.opentelemetry.io/otel/sdk v1.30.0 go.opentelemetry.io/otel/trace v1.30.0 ) @@ -17,9 +16,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/google/uuid v1.6.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect - golang.org/x/sys v0.25.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/instrumentation/github.com/emicklei/go-restful/otelrestful/go.sum b/instrumentation/github.com/emicklei/go-restful/otelrestful/go.sum index 3dab29fb898..59bda4fd940 100644 --- a/instrumentation/github.com/emicklei/go-restful/otelrestful/go.sum +++ b/instrumentation/github.com/emicklei/go-restful/otelrestful/go.sum @@ -9,8 +9,6 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= @@ -19,12 +17,8 @@ go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= -go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= -go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/instrumentation/github.com/emicklei/go-restful/otelrestful/restful_test.go b/instrumentation/github.com/emicklei/go-restful/otelrestful/restful_test.go index 0ae6b1fe688..ab2a4bf6274 100644 --- a/instrumentation/github.com/emicklei/go-restful/otelrestful/restful_test.go +++ b/instrumentation/github.com/emicklei/go-restful/otelrestful/restful_test.go @@ -11,14 +11,11 @@ import ( "github.com/emicklei/go-restful/v3" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful" b3prop "go.opentelemetry.io/contrib/propagators/b3" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/propagation" - sdktrace "go.opentelemetry.io/otel/sdk/trace" - "go.opentelemetry.io/otel/sdk/trace/tracetest" oteltrace "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/otel/trace/noop" ) @@ -111,145 +108,3 @@ func TestPropagationWithCustomPropagators(t *testing.T) { container.ServeHTTP(w, r) } - -func TestWithPublicEndpoint(t *testing.T) { - spanRecorder := tracetest.NewSpanRecorder() - provider := sdktrace.NewTracerProvider( - sdktrace.WithSpanProcessor(spanRecorder), - ) - remoteSpan := oteltrace.SpanContextConfig{ - TraceID: oteltrace.TraceID{0x01}, - SpanID: oteltrace.SpanID{0x01}, - Remote: true, - } - prop := propagation.TraceContext{} - - handlerFunc := func(req *restful.Request, resp *restful.Response) { - s := oteltrace.SpanFromContext(req.Request.Context()) - sc := s.SpanContext() - - // Should be with new root trace. - assert.True(t, sc.IsValid()) - assert.False(t, sc.IsRemote()) - assert.NotEqual(t, remoteSpan.TraceID, sc.TraceID()) - } - - ws := &restful.WebService{} - ws.Route(ws.GET("/user/{id}").To(handlerFunc)) - - container := restful.NewContainer() - container.Filter(otelrestful.OTelFilter("test_handler", - otelrestful.WithPublicEndpoint(), - otelrestful.WithPropagators(prop), - otelrestful.WithTracerProvider(provider)), - ) - container.Add(ws) - - r, err := http.NewRequest(http.MethodGet, "http://localhost/user/123", nil) - require.NoError(t, err) - - sc := oteltrace.NewSpanContext(remoteSpan) - ctx := oteltrace.ContextWithSpanContext(context.Background(), sc) - prop.Inject(ctx, propagation.HeaderCarrier(r.Header)) - - rr := httptest.NewRecorder() - container.ServeHTTP(rr, r) - assert.Equal(t, 200, rr.Result().StatusCode) //nolint:bodyclose // False positive for httptest.ResponseRecorder: https://github.com/timakin/bodyclose/issues/59. - - // Recorded span should be linked with an incoming span context. - assert.NoError(t, spanRecorder.ForceFlush(ctx)) - done := spanRecorder.Ended() - require.Len(t, done, 1) - require.Len(t, done[0].Links(), 1, "should contain link") - require.True(t, sc.Equal(done[0].Links()[0].SpanContext), "should link incoming span context") -} - -func TestWithPublicEndpointFn(t *testing.T) { - remoteSpan := oteltrace.SpanContextConfig{ - TraceID: oteltrace.TraceID{0x01}, - SpanID: oteltrace.SpanID{0x01}, - TraceFlags: oteltrace.FlagsSampled, - Remote: true, - } - prop := propagation.TraceContext{} - - for _, tt := range []struct { - name string - fn func(*http.Request) bool - handlerAssert func(*testing.T, oteltrace.SpanContext) - spansAssert func(*testing.T, oteltrace.SpanContext, []sdktrace.ReadOnlySpan) - }{ - { - name: "with the method returning true", - fn: func(r *http.Request) bool { - return true - }, - handlerAssert: func(t *testing.T, sc oteltrace.SpanContext) { - // Should be with new root trace. - assert.True(t, sc.IsValid()) - assert.False(t, sc.IsRemote()) - assert.NotEqual(t, remoteSpan.TraceID, sc.TraceID()) - }, - spansAssert: func(t *testing.T, sc oteltrace.SpanContext, spans []sdktrace.ReadOnlySpan) { - require.Len(t, spans, 1) - require.Len(t, spans[0].Links(), 1, "should contain link") - require.True(t, sc.Equal(spans[0].Links()[0].SpanContext), "should link incoming span context") - }, - }, - { - name: "with the method returning false", - fn: func(r *http.Request) bool { - return false - }, - handlerAssert: func(t *testing.T, sc oteltrace.SpanContext) { - // Should have remote span as parent - assert.True(t, sc.IsValid()) - assert.False(t, sc.IsRemote()) - assert.Equal(t, remoteSpan.TraceID, sc.TraceID()) - }, - spansAssert: func(t *testing.T, _ oteltrace.SpanContext, spans []sdktrace.ReadOnlySpan) { - require.Len(t, spans, 1) - require.Empty(t, spans[0].Links(), "should not contain link") - }, - }, - } { - t.Run(tt.name, func(t *testing.T) { - spanRecorder := tracetest.NewSpanRecorder() - provider := sdktrace.NewTracerProvider( - sdktrace.WithSpanProcessor(spanRecorder), - ) - - handlerFunc := func(req *restful.Request, resp *restful.Response) { - s := oteltrace.SpanFromContext(req.Request.Context()) - tt.handlerAssert(t, s.SpanContext()) - } - - ws := &restful.WebService{} - ws.Route(ws.GET("/user/{id}").To(handlerFunc)) - - container := restful.NewContainer() - container.Filter(otelrestful.OTelFilter("test_handler", - otelrestful.WithPublicEndpointFn(tt.fn), - otelrestful.WithPropagators(prop), - otelrestful.WithTracerProvider(provider)), - ) - container.Add(ws) - - r, err := http.NewRequest(http.MethodGet, "http://localhost/user/123", nil) - require.NoError(t, err) - - sc := oteltrace.NewSpanContext(remoteSpan) - ctx := oteltrace.ContextWithSpanContext(context.Background(), sc) - prop.Inject(ctx, propagation.HeaderCarrier(r.Header)) - - rr := httptest.NewRecorder() - container.ServeHTTP(rr, r) - assert.Equal(t, http.StatusOK, rr.Result().StatusCode) //nolint:bodyclose // False positive for httptest.ResponseRecorder: https://github.com/timakin/bodyclose/issues/59. - - // Recorded span should be linked with an incoming span context. - assert.NoError(t, spanRecorder.ForceFlush(ctx)) - spans := spanRecorder.Ended() - tt.spansAssert(t, sc, spans) - }) - } -} diff --git a/instrumentation/github.com/emicklei/go-restful/otelrestful/test/restful_test.go b/instrumentation/github.com/emicklei/go-restful/otelrestful/test/restful_test.go index 89570c43f17..b34c6dc7344 100644 --- a/instrumentation/github.com/emicklei/go-restful/otelrestful/test/restful_test.go +++ b/instrumentation/github.com/emicklei/go-restful/otelrestful/test/restful_test.go @@ -4,6 +4,7 @@ package test import ( + "context" "net/http" "net/http/httptest" "strconv" @@ -17,6 +18,7 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/propagation" sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" oteltrace "go.opentelemetry.io/otel/trace" @@ -191,6 +193,148 @@ func TestSpanStatus(t *testing.T) { } } +func TestWithPublicEndpoint(t *testing.T) { + spanRecorder := tracetest.NewSpanRecorder() + provider := sdktrace.NewTracerProvider( + sdktrace.WithSpanProcessor(spanRecorder), + ) + remoteSpan := oteltrace.SpanContextConfig{ + TraceID: oteltrace.TraceID{0x01}, + SpanID: oteltrace.SpanID{0x01}, + Remote: true, + } + prop := propagation.TraceContext{} + + handlerFunc := func(req *restful.Request, resp *restful.Response) { + s := oteltrace.SpanFromContext(req.Request.Context()) + sc := s.SpanContext() + + // Should be with new root trace. + assert.True(t, sc.IsValid()) + assert.False(t, sc.IsRemote()) + assert.NotEqual(t, remoteSpan.TraceID, sc.TraceID()) + } + + ws := &restful.WebService{} + ws.Route(ws.GET("/user/{id}").To(handlerFunc)) + + container := restful.NewContainer() + container.Filter(otelrestful.OTelFilter("test_handler", + otelrestful.WithPublicEndpoint(), + otelrestful.WithPropagators(prop), + otelrestful.WithTracerProvider(provider)), + ) + container.Add(ws) + + r, err := http.NewRequest(http.MethodGet, "http://localhost/user/123", nil) + require.NoError(t, err) + + sc := oteltrace.NewSpanContext(remoteSpan) + ctx := oteltrace.ContextWithSpanContext(context.Background(), sc) + prop.Inject(ctx, propagation.HeaderCarrier(r.Header)) + + rr := httptest.NewRecorder() + container.ServeHTTP(rr, r) + assert.Equal(t, 200, rr.Result().StatusCode) //nolint:bodyclose // False positive for httptest.ResponseRecorder: https://github.com/timakin/bodyclose/issues/59. + + // Recorded span should be linked with an incoming span context. + assert.NoError(t, spanRecorder.ForceFlush(ctx)) + done := spanRecorder.Ended() + require.Len(t, done, 1) + require.Len(t, done[0].Links(), 1, "should contain link") + require.True(t, sc.Equal(done[0].Links()[0].SpanContext), "should link incoming span context") +} + +func TestWithPublicEndpointFn(t *testing.T) { + remoteSpan := oteltrace.SpanContextConfig{ + TraceID: oteltrace.TraceID{0x01}, + SpanID: oteltrace.SpanID{0x01}, + TraceFlags: oteltrace.FlagsSampled, + Remote: true, + } + prop := propagation.TraceContext{} + + for _, tt := range []struct { + name string + fn func(*http.Request) bool + handlerAssert func(*testing.T, oteltrace.SpanContext) + spansAssert func(*testing.T, oteltrace.SpanContext, []sdktrace.ReadOnlySpan) + }{ + { + name: "with the method returning true", + fn: func(r *http.Request) bool { + return true + }, + handlerAssert: func(t *testing.T, sc oteltrace.SpanContext) { + // Should be with new root trace. + assert.True(t, sc.IsValid()) + assert.False(t, sc.IsRemote()) + assert.NotEqual(t, remoteSpan.TraceID, sc.TraceID()) + }, + spansAssert: func(t *testing.T, sc oteltrace.SpanContext, spans []sdktrace.ReadOnlySpan) { + require.Len(t, spans, 1) + require.Len(t, spans[0].Links(), 1, "should contain link") + require.True(t, sc.Equal(spans[0].Links()[0].SpanContext), "should link incoming span context") + }, + }, + { + name: "with the method returning false", + fn: func(r *http.Request) bool { + return false + }, + handlerAssert: func(t *testing.T, sc oteltrace.SpanContext) { + // Should have remote span as parent + assert.True(t, sc.IsValid()) + assert.False(t, sc.IsRemote()) + assert.Equal(t, remoteSpan.TraceID, sc.TraceID()) + }, + spansAssert: func(t *testing.T, _ oteltrace.SpanContext, spans []sdktrace.ReadOnlySpan) { + require.Len(t, spans, 1) + require.Empty(t, spans[0].Links(), "should not contain link") + }, + }, + } { + t.Run(tt.name, func(t *testing.T) { + spanRecorder := tracetest.NewSpanRecorder() + provider := sdktrace.NewTracerProvider( + sdktrace.WithSpanProcessor(spanRecorder), + ) + + handlerFunc := func(req *restful.Request, resp *restful.Response) { + s := oteltrace.SpanFromContext(req.Request.Context()) + tt.handlerAssert(t, s.SpanContext()) + } + + ws := &restful.WebService{} + ws.Route(ws.GET("/user/{id}").To(handlerFunc)) + + container := restful.NewContainer() + container.Filter(otelrestful.OTelFilter("test_handler", + otelrestful.WithPublicEndpointFn(tt.fn), + otelrestful.WithPropagators(prop), + otelrestful.WithTracerProvider(provider)), + ) + container.Add(ws) + + r, err := http.NewRequest(http.MethodGet, "http://localhost/user/123", nil) + require.NoError(t, err) + + sc := oteltrace.NewSpanContext(remoteSpan) + ctx := oteltrace.ContextWithSpanContext(context.Background(), sc) + prop.Inject(ctx, propagation.HeaderCarrier(r.Header)) + + rr := httptest.NewRecorder() + container.ServeHTTP(rr, r) + assert.Equal(t, http.StatusOK, rr.Result().StatusCode) //nolint:bodyclose // False positive for httptest.ResponseRecorder: https://github.com/timakin/bodyclose/issues/59. + + // Recorded span should be linked with an incoming span context. + assert.NoError(t, spanRecorder.ForceFlush(ctx)) + spans := spanRecorder.Ended() + tt.spansAssert(t, sc, spans) + }) + } +} + func assertSpan(t *testing.T, span sdktrace.ReadOnlySpan, name string, attrs ...attribute.KeyValue) { assert.Equal(t, name, span.Name()) assert.Equal(t, oteltrace.SpanKindServer, span.SpanKind()) From 6e6cd09db9d802614536d7d5dc66e96ad3ee1dce Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Mon, 23 Sep 2024 15:52:11 +0200 Subject: [PATCH 4/8] fix linter for instrumentation/runtime --- instrumentation/runtime/example_test.go | 2 +- instrumentation/runtime/producer.go | 6 ++-- instrumentation/runtime/runtime_test.go | 8 ++--- instrumentation/runtime/test/go.mod | 23 +++++++++++++ instrumentation/runtime/test/go.sum | 33 +++++++++++++++++++ .../runtime/{ => test}/producer_test.go | 7 ++-- 6 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 instrumentation/runtime/test/go.mod create mode 100644 instrumentation/runtime/test/go.sum rename instrumentation/runtime/{ => test}/producer_test.go (88%) diff --git a/instrumentation/runtime/example_test.go b/instrumentation/runtime/example_test.go index 08a438bcf6a..a20947ded4b 100644 --- a/instrumentation/runtime/example_test.go +++ b/instrumentation/runtime/example_test.go @@ -10,7 +10,7 @@ import ( "go.opentelemetry.io/contrib/instrumentation/runtime" "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric" //nolint:depguard ) func Example() { diff --git a/instrumentation/runtime/producer.go b/instrumentation/runtime/producer.go index 0697208db98..56250937114 100644 --- a/instrumentation/runtime/producer.go +++ b/instrumentation/runtime/producer.go @@ -12,9 +12,9 @@ import ( "time" "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk/instrumentation" - "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/instrumentation" //nolint:depguard // We rely on instrumentation.Scope. + "go.opentelemetry.io/otel/sdk/metric" //nolint:depguard // We rely on metric.Producer. + "go.opentelemetry.io/otel/sdk/metric/metricdata" // nolint:depguard // We rely on metricdata. ) var startTime time.Time diff --git a/instrumentation/runtime/runtime_test.go b/instrumentation/runtime/runtime_test.go index 78b3b52b784..3726c9586df 100644 --- a/instrumentation/runtime/runtime_test.go +++ b/instrumentation/runtime/runtime_test.go @@ -15,10 +15,10 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk/instrumentation" - "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" + "go.opentelemetry.io/otel/sdk/instrumentation" //nolint:depguard + "go.opentelemetry.io/otel/sdk/metric" //nolint:depguard + "go.opentelemetry.io/otel/sdk/metric/metricdata" //nolint:depguard + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" //nolint:depguard ) func TestRefreshGoCollector(t *testing.T) { diff --git a/instrumentation/runtime/test/go.mod b/instrumentation/runtime/test/go.mod new file mode 100644 index 00000000000..5f673337aea --- /dev/null +++ b/instrumentation/runtime/test/go.mod @@ -0,0 +1,23 @@ +module go.opentelemetry.io/contrib/instrumentation/runtime/test + +go 1.22 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/contrib/instrumentation/runtime v0.55.0 + go.opentelemetry.io/otel/sdk v1.30.0 + go.opentelemetry.io/otel/sdk/metric v1.30.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.opentelemetry.io/otel v1.30.0 // indirect + go.opentelemetry.io/otel/metric v1.30.0 // indirect + go.opentelemetry.io/otel/trace v1.30.0 // indirect + golang.org/x/sys v0.25.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/instrumentation/runtime/test/go.sum b/instrumentation/runtime/test/go.sum new file mode 100644 index 00000000000..11bd11657d4 --- /dev/null +++ b/instrumentation/runtime/test/go.sum @@ -0,0 +1,33 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/contrib/instrumentation/runtime v0.55.0 h1:GotCpbh7YkCHdFs+hYMdvAEyGsBZifFognqrOnBwyJM= +go.opentelemetry.io/contrib/instrumentation/runtime v0.55.0/go.mod h1:6b0AS55EEPj7qP44khqF5dqTUq+RkakDMShFaW1EcA4= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= +go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= +go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= +go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= +go.opentelemetry.io/otel/sdk/metric v1.30.0 h1:QJLT8Pe11jyHBHfSAgYH7kEmT24eX792jZO1bo4BXkM= +go.opentelemetry.io/otel/sdk/metric v1.30.0/go.mod h1:waS6P3YqFNzeP01kuo/MBBYqaoBJl7efRQHOaydhy1Y= +go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= +go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/instrumentation/runtime/producer_test.go b/instrumentation/runtime/test/producer_test.go similarity index 88% rename from instrumentation/runtime/producer_test.go rename to instrumentation/runtime/test/producer_test.go index 1e467928c5e..f885300409e 100644 --- a/instrumentation/runtime/producer_test.go +++ b/instrumentation/runtime/test/producer_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package runtime // import "go.opentelemetry.io/contrib/instrumentation/runtime" +package test import ( "context" @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/contrib/instrumentation/runtime" "go.opentelemetry.io/otel/sdk/instrumentation" "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/metric/metricdata" @@ -17,7 +18,7 @@ import ( ) func TestNewProducer(t *testing.T) { - reader := metric.NewManualReader(metric.WithProducer(NewProducer())) + reader := metric.NewManualReader(metric.WithProducer(runtime.NewProducer())) _ = metric.NewMeterProvider(metric.WithReader(reader)) rm := metricdata.ResourceMetrics{} err := reader.Collect(context.Background(), &rm) @@ -28,7 +29,7 @@ func TestNewProducer(t *testing.T) { expectedScopeMetric := metricdata.ScopeMetrics{ Scope: instrumentation.Scope{ Name: "go.opentelemetry.io/contrib/instrumentation/runtime", - Version: Version(), + Version: runtime.Version(), }, Metrics: []metricdata.Metrics{ { From 821fbb4a55415abcca18965deee68849d06ef027 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Mon, 23 Sep 2024 15:52:21 +0200 Subject: [PATCH 5/8] look for test/examples in subfolders --- .golangci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 35955931eee..94118573efb 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -79,7 +79,9 @@ linters-settings: files: - "**/*/instrumentation/**/*.go" - "!**/*test/*.go" + - "!**/*test/**/*.go" - "!**/*example/*.go" + - "!**/*example/**/*.go" deny: - pkg: go.opentelemetry.io/otel/sdk desc: "Instrumentations should not use the SDKs, except in test or example modules" From 85a3e228cbfd61720be7a730103dedd87b074771 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Mon, 23 Sep 2024 16:00:15 +0200 Subject: [PATCH 6/8] add bridges to sdk prevention --- .golangci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 94118573efb..474a8891c9c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -77,14 +77,14 @@ linters-settings: rules: no-sdk-instrumentation: files: - - "**/*/instrumentation/**/*.go" + - "**/*/{bridges,instrumentation}/**/*.go" - "!**/*test/*.go" - "!**/*test/**/*.go" - "!**/*example/*.go" - "!**/*example/**/*.go" deny: - pkg: go.opentelemetry.io/otel/sdk - desc: "Instrumentations should not use the SDKs, except in test or example modules" + desc: "Bridges and instrumentations should not use the SDKs, except in test or example modules" non-tests: files: - "!$test" From 5e80ecc518437984e14940ef2ef6232413ac59a9 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Mon, 23 Sep 2024 16:00:36 +0200 Subject: [PATCH 7/8] fix prometheus depguard issues --- bridges/prometheus/example_test.go | 2 +- bridges/prometheus/producer.go | 6 +++--- bridges/prometheus/producer_test.go | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bridges/prometheus/example_test.go b/bridges/prometheus/example_test.go index 2f8dd5b48b4..92412c78d0b 100644 --- a/bridges/prometheus/example_test.go +++ b/bridges/prometheus/example_test.go @@ -5,7 +5,7 @@ package prometheus_test import ( "go.opentelemetry.io/contrib/bridges/prometheus" - "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric" //nolint:depguard ) func ExampleNewMetricProducer() { diff --git a/bridges/prometheus/producer.go b/bridges/prometheus/producer.go index e94d07a6d46..3e58a81889d 100644 --- a/bridges/prometheus/producer.go +++ b/bridges/prometheus/producer.go @@ -16,9 +16,9 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk/instrumentation" - "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/instrumentation" //nolint:depguard + "go.opentelemetry.io/otel/sdk/metric" //nolint:depguard + "go.opentelemetry.io/otel/sdk/metric/metricdata" //nolint:depguard ) const ( diff --git a/bridges/prometheus/producer_test.go b/bridges/prometheus/producer_test.go index 801fe27dd23..664bf95e1a2 100644 --- a/bridges/prometheus/producer_test.go +++ b/bridges/prometheus/producer_test.go @@ -13,9 +13,9 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk/instrumentation" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" + "go.opentelemetry.io/otel/sdk/instrumentation" //nolint:depguard + "go.opentelemetry.io/otel/sdk/metric/metricdata" //nolint:depguard + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" //nolint:depguard ) const ( From 52b38b6c72db8ee70a4ed094dd7f357d7a24b599 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Mon, 23 Sep 2024 17:00:43 +0200 Subject: [PATCH 8/8] allow sdk for prometheus and runtime at the golangci level --- .golangci.yml | 2 ++ bridges/prometheus/example_test.go | 2 +- bridges/prometheus/producer.go | 6 ++-- bridges/prometheus/producer_test.go | 6 ++-- instrumentation/runtime/example_test.go | 2 +- instrumentation/runtime/producer.go | 6 ++-- .../runtime/{test => }/producer_test.go | 7 ++-- instrumentation/runtime/runtime_test.go | 8 ++--- instrumentation/runtime/test/go.mod | 23 ------------- instrumentation/runtime/test/go.sum | 33 ------------------- 10 files changed, 20 insertions(+), 75 deletions(-) rename instrumentation/runtime/{test => }/producer_test.go (88%) delete mode 100644 instrumentation/runtime/test/go.mod delete mode 100644 instrumentation/runtime/test/go.sum diff --git a/.golangci.yml b/.golangci.yml index 474a8891c9c..82da4bd5dd0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -78,6 +78,8 @@ linters-settings: no-sdk-instrumentation: files: - "**/*/{bridges,instrumentation}/**/*.go" + - "!**/*/bridges/prometheus/*.go" # prometheus bridge is meant to use the SDK + - "!**/*/instrumentation/runtime/*.go" # runtime instrumentation is meant to use the SDK - "!**/*test/*.go" - "!**/*test/**/*.go" - "!**/*example/*.go" diff --git a/bridges/prometheus/example_test.go b/bridges/prometheus/example_test.go index 92412c78d0b..2f8dd5b48b4 100644 --- a/bridges/prometheus/example_test.go +++ b/bridges/prometheus/example_test.go @@ -5,7 +5,7 @@ package prometheus_test import ( "go.opentelemetry.io/contrib/bridges/prometheus" - "go.opentelemetry.io/otel/sdk/metric" //nolint:depguard + "go.opentelemetry.io/otel/sdk/metric" ) func ExampleNewMetricProducer() { diff --git a/bridges/prometheus/producer.go b/bridges/prometheus/producer.go index 3e58a81889d..e94d07a6d46 100644 --- a/bridges/prometheus/producer.go +++ b/bridges/prometheus/producer.go @@ -16,9 +16,9 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk/instrumentation" //nolint:depguard - "go.opentelemetry.io/otel/sdk/metric" //nolint:depguard - "go.opentelemetry.io/otel/sdk/metric/metricdata" //nolint:depguard + "go.opentelemetry.io/otel/sdk/instrumentation" + "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" ) const ( diff --git a/bridges/prometheus/producer_test.go b/bridges/prometheus/producer_test.go index 664bf95e1a2..801fe27dd23 100644 --- a/bridges/prometheus/producer_test.go +++ b/bridges/prometheus/producer_test.go @@ -13,9 +13,9 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk/instrumentation" //nolint:depguard - "go.opentelemetry.io/otel/sdk/metric/metricdata" //nolint:depguard - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" //nolint:depguard + "go.opentelemetry.io/otel/sdk/instrumentation" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) const ( diff --git a/instrumentation/runtime/example_test.go b/instrumentation/runtime/example_test.go index a20947ded4b..08a438bcf6a 100644 --- a/instrumentation/runtime/example_test.go +++ b/instrumentation/runtime/example_test.go @@ -10,7 +10,7 @@ import ( "go.opentelemetry.io/contrib/instrumentation/runtime" "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/sdk/metric" //nolint:depguard + "go.opentelemetry.io/otel/sdk/metric" ) func Example() { diff --git a/instrumentation/runtime/producer.go b/instrumentation/runtime/producer.go index 56250937114..0697208db98 100644 --- a/instrumentation/runtime/producer.go +++ b/instrumentation/runtime/producer.go @@ -12,9 +12,9 @@ import ( "time" "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk/instrumentation" //nolint:depguard // We rely on instrumentation.Scope. - "go.opentelemetry.io/otel/sdk/metric" //nolint:depguard // We rely on metric.Producer. - "go.opentelemetry.io/otel/sdk/metric/metricdata" // nolint:depguard // We rely on metricdata. + "go.opentelemetry.io/otel/sdk/instrumentation" + "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" ) var startTime time.Time diff --git a/instrumentation/runtime/test/producer_test.go b/instrumentation/runtime/producer_test.go similarity index 88% rename from instrumentation/runtime/test/producer_test.go rename to instrumentation/runtime/producer_test.go index f885300409e..1e467928c5e 100644 --- a/instrumentation/runtime/test/producer_test.go +++ b/instrumentation/runtime/producer_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package test +package runtime // import "go.opentelemetry.io/contrib/instrumentation/runtime" import ( "context" @@ -10,7 +10,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/contrib/instrumentation/runtime" "go.opentelemetry.io/otel/sdk/instrumentation" "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/metric/metricdata" @@ -18,7 +17,7 @@ import ( ) func TestNewProducer(t *testing.T) { - reader := metric.NewManualReader(metric.WithProducer(runtime.NewProducer())) + reader := metric.NewManualReader(metric.WithProducer(NewProducer())) _ = metric.NewMeterProvider(metric.WithReader(reader)) rm := metricdata.ResourceMetrics{} err := reader.Collect(context.Background(), &rm) @@ -29,7 +28,7 @@ func TestNewProducer(t *testing.T) { expectedScopeMetric := metricdata.ScopeMetrics{ Scope: instrumentation.Scope{ Name: "go.opentelemetry.io/contrib/instrumentation/runtime", - Version: runtime.Version(), + Version: Version(), }, Metrics: []metricdata.Metrics{ { diff --git a/instrumentation/runtime/runtime_test.go b/instrumentation/runtime/runtime_test.go index 3726c9586df..78b3b52b784 100644 --- a/instrumentation/runtime/runtime_test.go +++ b/instrumentation/runtime/runtime_test.go @@ -15,10 +15,10 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk/instrumentation" //nolint:depguard - "go.opentelemetry.io/otel/sdk/metric" //nolint:depguard - "go.opentelemetry.io/otel/sdk/metric/metricdata" //nolint:depguard - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" //nolint:depguard + "go.opentelemetry.io/otel/sdk/instrumentation" + "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) func TestRefreshGoCollector(t *testing.T) { diff --git a/instrumentation/runtime/test/go.mod b/instrumentation/runtime/test/go.mod deleted file mode 100644 index 5f673337aea..00000000000 --- a/instrumentation/runtime/test/go.mod +++ /dev/null @@ -1,23 +0,0 @@ -module go.opentelemetry.io/contrib/instrumentation/runtime/test - -go 1.22 - -require ( - github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/contrib/instrumentation/runtime v0.55.0 - go.opentelemetry.io/otel/sdk v1.30.0 - go.opentelemetry.io/otel/sdk/metric v1.30.0 -) - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/otel v1.30.0 // indirect - go.opentelemetry.io/otel/metric v1.30.0 // indirect - go.opentelemetry.io/otel/trace v1.30.0 // indirect - golang.org/x/sys v0.25.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/instrumentation/runtime/test/go.sum b/instrumentation/runtime/test/go.sum deleted file mode 100644 index 11bd11657d4..00000000000 --- a/instrumentation/runtime/test/go.sum +++ /dev/null @@ -1,33 +0,0 @@ -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/contrib/instrumentation/runtime v0.55.0 h1:GotCpbh7YkCHdFs+hYMdvAEyGsBZifFognqrOnBwyJM= -go.opentelemetry.io/contrib/instrumentation/runtime v0.55.0/go.mod h1:6b0AS55EEPj7qP44khqF5dqTUq+RkakDMShFaW1EcA4= -go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= -go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= -go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= -go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= -go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= -go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= -go.opentelemetry.io/otel/sdk/metric v1.30.0 h1:QJLT8Pe11jyHBHfSAgYH7kEmT24eX792jZO1bo4BXkM= -go.opentelemetry.io/otel/sdk/metric v1.30.0/go.mod h1:waS6P3YqFNzeP01kuo/MBBYqaoBJl7efRQHOaydhy1Y= -go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= -go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=