Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

### Added
### Changed

- Change `Version()` function in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` to a `const Version` string. (#8142)
- Change `Version()` function in `go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo` to a `const Version` string. (#8340)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func newConfig(opts ...Option) config {

cfg.Tracer = cfg.TracerProvider.Tracer(
ScopeName,
trace.WithInstrumentationVersion(Version()),
trace.WithInstrumentationVersion(Version),
)
return cfg
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
package test // import "go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test"

// Version is the current release version of the mongo-driver instrumentation test module.
func Version() string {
return "0.64.0"
// This string is updated by the pre_release.sh script during release
}
// It is updated by the pre_release.sh script during release.
Copy link
Member

@pellared pellared Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The is an internal comment. It should not be visible in pkg.godev. Use pkgsite for testing how the documentation renders.

Suggested change
// It is updated by the pre_release.sh script during release.

const Version = "0.64.0"
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ var versionRegex = regexp.MustCompile(`^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)
`(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`)

func TestVersionSemver(t *testing.T) {
v := test.Version()
v := test.Version
assert.NotNil(t, versionRegex.FindStringSubmatch(v), "version is not semver: %s", v)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
package otelmongo // import "go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo"

// Version is the current release version of the mongo-driver instrumentation.
func Version() string {
return "0.64.0"
// This string is updated by the pre_release.sh script during release
}
// It is updated by the pre_release.sh script during release.
Copy link
Member

@pellared pellared Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The is an internal comment. It should not be visible in pkg.godev. Use pkgsite for testing how the documentation renders.

Suggested change
// It is updated by the pre_release.sh script during release.

const Version = "0.64.0"
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ var versionRegex = regexp.MustCompile(`^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)
`(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`)

func TestVersionSemver(t *testing.T) {
v := otelmongo.Version()
v := otelmongo.Version
assert.NotNil(t, versionRegex.FindStringSubmatch(v), "version is not semver: %s", v)
}
Loading