From f9a033be4f2df28404c3e58a72dd7a4926864b02 Mon Sep 17 00:00:00 2001 From: Kuisong Tong Date: Thu, 21 Nov 2024 13:14:16 -0800 Subject: [PATCH] upgrade dependencies (#53) --- .github/dependabot.yml | 8 ++++++-- otel/go.mod | 6 +++--- otel/go.sum | 8 ++++---- otel/handler_test.go | 20 +++++++++----------- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 29a3deb..b5c3249 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,6 +7,10 @@ updates: - Skip-Changelog schedule: interval: weekly + groups: + dependencies: + patterns: + - * - package-ecosystem: gomod directory: /otel @@ -15,9 +19,9 @@ updates: schedule: interval: weekly groups: - go.opentelemetry.io: + dependencies: patterns: - - go.opentelemetry.io/* + - * - package-ecosystem: github-actions directory: / diff --git a/otel/go.mod b/otel/go.mod index 11e1d0e..70d02d9 100644 --- a/otel/go.mod +++ b/otel/go.mod @@ -1,10 +1,10 @@ module github.com/nil-go/sloth/otel -go 1.21 +go 1.22 require ( - go.opentelemetry.io/otel v1.29.0 - go.opentelemetry.io/otel/trace v1.29.0 + go.opentelemetry.io/otel v1.32.0 + go.opentelemetry.io/otel/trace v1.32.0 ) retract v0.2.0 // wrong trace context key diff --git a/otel/go.sum b/otel/go.sum index 117dd58..a02925b 100644 --- a/otel/go.sum +++ b/otel/go.sum @@ -6,9 +6,9 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb 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/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= -go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= -go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= -go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= 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/otel/handler_test.go b/otel/handler_test.go index 81afb52..40155e7 100644 --- a/otel/handler_test.go +++ b/otel/handler_test.go @@ -48,8 +48,6 @@ func TestHandler(t *testing.T) { t.Parallel() for _, testcase := range testcases() { - testcase := testcase - t.Run(testcase.description, func(t *testing.T) { t.Parallel() @@ -181,15 +179,15 @@ level=INFO msg=msg3 g.h.error="an error" events: map[string][]trace.EventOption{ "msg1": { trace.WithTimestamp(time.Unix(100, 1000)), - trace.WithAttributes(attribute.String("a", "A"), filePath, semconv.CodeLineNumber(73), function), + trace.WithAttributes(attribute.String("a", "A"), filePath, semconv.CodeLineNumber(71), function), }, "msg2": { trace.WithTimestamp(time.Unix(100, 1000)), - trace.WithAttributes(attribute.String("g.b", "B"), filePath, semconv.CodeLineNumber(76), function), + trace.WithAttributes(attribute.String("g.b", "B"), filePath, semconv.CodeLineNumber(74), function), }, "msg3": { trace.WithTimestamp(time.Unix(100, 1000)), - trace.WithAttributes(filePath, semconv.CodeLineNumber(78), function, attribute.String("g.h.error", "an error")), + trace.WithAttributes(filePath, semconv.CodeLineNumber(76), function, attribute.String("g.h.error", "an error")), }, }, }, @@ -210,15 +208,15 @@ level=INFO msg=msg3 g.h.error="an error" errors: map[error][]trace.EventOption{ errors.New("msg1"): { trace.WithTimestamp(time.Unix(100, 1000)), - trace.WithAttributes(attribute.String("a", "A"), filePath, semconv.CodeLineNumber(73), function), + trace.WithAttributes(attribute.String("a", "A"), filePath, semconv.CodeLineNumber(71), function), }, errors.New("msg2"): { trace.WithTimestamp(time.Unix(100, 1000)), - trace.WithAttributes(attribute.String("g.b", "B"), filePath, semconv.CodeLineNumber(76), function), + trace.WithAttributes(attribute.String("g.b", "B"), filePath, semconv.CodeLineNumber(74), function), }, fmt.Errorf("msg3: %w", errors.New("an error")): { trace.WithTimestamp(time.Unix(100, 1000)), - trace.WithAttributes(filePath, semconv.CodeLineNumber(78), function), + trace.WithAttributes(filePath, semconv.CodeLineNumber(76), function), }, }, status: codes.Error, @@ -244,15 +242,15 @@ level=INFO msg=msg3 trace_id=4bf92f3577b34da6a3ce929d0e0e4736 span_id=00f067aa0b events: map[string][]trace.EventOption{ "msg1": { trace.WithTimestamp(time.Unix(100, 1000)), - trace.WithAttributes(attribute.String("a", "A"), filePath, semconv.CodeLineNumber(73), function), + trace.WithAttributes(attribute.String("a", "A"), filePath, semconv.CodeLineNumber(71), function), }, "msg2": { trace.WithTimestamp(time.Unix(100, 1000)), - trace.WithAttributes(attribute.String("g.b", "B"), filePath, semconv.CodeLineNumber(76), function), + trace.WithAttributes(attribute.String("g.b", "B"), filePath, semconv.CodeLineNumber(74), function), }, "msg3": { trace.WithTimestamp(time.Unix(100, 1000)), - trace.WithAttributes(filePath, semconv.CodeLineNumber(78), function, attribute.String("g.h.error", "an error")), + trace.WithAttributes(filePath, semconv.CodeLineNumber(76), function, attribute.String("g.h.error", "an error")), }, }, },