From b50e84679a79983badd0694af1aa0c1b1b3ae1d5 Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Wed, 23 Oct 2024 10:25:10 -0600 Subject: [PATCH 1/5] otelmongo semconv 1.24.0 bump --- .../go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go index b3c56ccc1bf..141e1eeaa81 100644 --- a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go +++ b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.24.0" "go.opentelemetry.io/otel/trace" "go.mongodb.org/mongo-driver/bson" From 9058c4920391893ad66b896b61bb750eefa5a372 Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Wed, 23 Oct 2024 10:42:00 -0600 Subject: [PATCH 2/5] Update changelog --- CHANGELOG.md | 1 + .../go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b5c995c081..1671b9dc1e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Transform nil attribute values to `log.Value` zero value instead of `log.StringValue("")` in `go.opentelemetry.io/contrib/bridges/otelslog`. (#6246) - Fix `NewClientHandler` so that `rpc.client.request.*` metrics measure requests instead of responses and `rpc.client.responses.*` metrics measure responses instead of requests in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`. (#6250) - Fix issue in `go.opentelemetry.io/contrib/config` causing `otelprom.WithResourceAsConstantLabels` configuration to not be respected. (#6260) +- Bump otelmongo semconv from 1.17.0 to 1.24.0. (#6272) diff --git a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go index 141e1eeaa81..554f9b54238 100644 --- a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go +++ b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go @@ -39,9 +39,9 @@ func (m *monitor) Started(ctx context.Context, evt *event.CommandStartedEvent) { semconv.DBSystemMongoDB, semconv.DBOperation(evt.CommandName), semconv.DBName(evt.DatabaseName), - semconv.NetPeerName(hostname), - semconv.NetPeerPort(port), - semconv.NetTransportTCP, + semconv.NetPeerName(hostname), //nolint:staticcheck + semconv.NetPeerPort(port), //nolint:staticcheck + semconv.NetTransportTCP, //nolint:staticcheck } if !m.cfg.CommandAttributeDisabled { attrs = append(attrs, semconv.DBStatement(sanitizeCommand(evt.Command))) From 6cfe6f87675537abfdce135ff577db3a432c77d5 Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Sun, 27 Oct 2024 15:10:04 -0600 Subject: [PATCH 3/5] Bump version to 1.21.0 --- CHANGELOG.md | 2 +- .../go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1671b9dc1e5..93f9bf68f85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Transform nil attribute values to `log.Value` zero value instead of `log.StringValue("")` in `go.opentelemetry.io/contrib/bridges/otelslog`. (#6246) - Fix `NewClientHandler` so that `rpc.client.request.*` metrics measure requests instead of responses and `rpc.client.responses.*` metrics measure responses instead of requests in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`. (#6250) - Fix issue in `go.opentelemetry.io/contrib/config` causing `otelprom.WithResourceAsConstantLabels` configuration to not be respected. (#6260) -- Bump otelmongo semconv from 1.17.0 to 1.24.0. (#6272) +- Bump otelmongo semconv from 1.17.0 to 1.21.0. (#6272) diff --git a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go index 554f9b54238..2b21c215d43 100644 --- a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go +++ b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.24.0" + semconv "go.opentelemetry.io/otel/semconv/v1.21.0" "go.opentelemetry.io/otel/trace" "go.mongodb.org/mongo-driver/bson" @@ -39,9 +39,9 @@ func (m *monitor) Started(ctx context.Context, evt *event.CommandStartedEvent) { semconv.DBSystemMongoDB, semconv.DBOperation(evt.CommandName), semconv.DBName(evt.DatabaseName), - semconv.NetPeerName(hostname), //nolint:staticcheck - semconv.NetPeerPort(port), //nolint:staticcheck - semconv.NetTransportTCP, //nolint:staticcheck + semconv.NetPeerName(hostname), + semconv.NetPeerPort(port), + semconv.NetTransportTCP, } if !m.cfg.CommandAttributeDisabled { attrs = append(attrs, semconv.DBStatement(sanitizeCommand(evt.Command))) From 0dfede9961c701eb5cf03d0bc5ad8ec1b6e526af Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Mon, 28 Oct 2024 10:17:07 -0600 Subject: [PATCH 4/5] Move bump changelog to changed --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93f9bf68f85..897bcdc5007 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Add the `WithSource` option to the `go.opentelemetry.io/contrib/bridges/otelslog` log bridge to set the `code.*` attributes in the log record that includes the source location where the record was emitted. (#6253) - Add `ContextWithStartTime` and `StartTimeFromContext` to `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`, which allows setting the start time using go context. (#6137) +### Changed + +- Bump otelmongo go.opentelemetry.io/otel/semconv/v1.17.0 to go.opentelemetry.io/otel/semconv/v1.21.0. (#6272) + ### Fixed - Transform nil attribute values to `log.Value` zero value instead of panicking in `go.opentelemetry.io/contrib/bridges/otellogrus`. (#6237) @@ -22,7 +26,6 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Transform nil attribute values to `log.Value` zero value instead of `log.StringValue("")` in `go.opentelemetry.io/contrib/bridges/otelslog`. (#6246) - Fix `NewClientHandler` so that `rpc.client.request.*` metrics measure requests instead of responses and `rpc.client.responses.*` metrics measure responses instead of requests in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`. (#6250) - Fix issue in `go.opentelemetry.io/contrib/config` causing `otelprom.WithResourceAsConstantLabels` configuration to not be respected. (#6260) -- Bump otelmongo semconv from 1.17.0 to 1.21.0. (#6272) From 4b30d5d0a6df52d263f2c0ab9f359adbdb3a8169 Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Mon, 28 Oct 2024 10:20:08 -0600 Subject: [PATCH 5/5] Update changelog wording --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 897bcdc5007..99aec1dfb6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed -- Bump otelmongo go.opentelemetry.io/otel/semconv/v1.17.0 to go.opentelemetry.io/otel/semconv/v1.21.0. (#6272) +- Upgrade `go.opentelemetry.io/otel/semconv/v1.17.0` to `go.opentelemetry.io/otel/semconv/v1.21.0` in `go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo`. (#6272) ### Fixed