From ebd8b895498470a5584dba798d782328797a4f91 Mon Sep 17 00:00:00 2001 From: Peter Nguyen Date: Thu, 8 Jan 2026 10:45:59 -0800 Subject: [PATCH 1/3] Replace Version() with const Version in otelmongo v2 --- .../go.mongodb.org/mongo-driver/v2/mongo/otelmongo/config.go | 4 ++-- .../mongo-driver/v2/mongo/otelmongo/version.go | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo/config.go b/instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo/config.go index 5a7f0fac09e..27e7c60ac15 100644 --- a/instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo/config.go +++ b/instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo/config.go @@ -49,12 +49,12 @@ func newConfig(opts ...Option) config { cfg.Meter = cfg.MeterProvider.Meter( ScopeName, - metric.WithInstrumentationVersion(Version()), + metric.WithInstrumentationVersion(Version), ) cfg.Tracer = cfg.TracerProvider.Tracer( ScopeName, - trace.WithInstrumentationVersion(Version()), + trace.WithInstrumentationVersion(Version), ) return cfg } diff --git a/instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo/version.go b/instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo/version.go index 3378a98a54e..53136360171 100644 --- a/instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo/version.go +++ b/instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo/version.go @@ -4,7 +4,4 @@ package otelmongo // import "go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo" // Version is the current release version of the mongo-go-driver V2 instrumentation. -func Version() string { - return "0.60.0" - // This string is updated by the pre_release.sh script during release -} +const Version = "0.64.0" From 9c7a485592819389920013e7109a159ca6489f4d Mon Sep 17 00:00:00 2001 From: Peter Nguyen Date: Thu, 8 Jan 2026 10:47:26 -0800 Subject: [PATCH 2/3] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c5308fcf7a..e48a839e4e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - The `Version()` function in `go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful` has been replaced by `const Version`. (#8360) - The `Version()` function in `go.opentelemetry.io/contrib/propagators/opencensus` has been replaced by `const Version`. (#8361) - The `Version()` function in `go.opentelemetry.io/contrib/samplers/probability/consistent` has been replaced by `const Version`. (#8366) +- The `Version()` function in `go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo` has been replaced by `const Version`. (#8370) From 9e2d3f49104499b88fc7f85c29a1de96d07cfad6 Mon Sep 17 00:00:00 2001 From: Peter Nguyen Date: Thu, 8 Jan 2026 11:22:02 -0800 Subject: [PATCH 3/3] empty commit to retrigger ci