Skip to content

fix(contrib/metric/otelmetric): use runtime.Version const for otel v0.65+#4803

Closed
sonnemusk wants to merge 3 commits into
gogf:masterfrom
sonnemusk:fix/otelmetric-runtime-version
Closed

fix(contrib/metric/otelmetric): use runtime.Version const for otel v0.65+#4803
sonnemusk wants to merge 3 commits into
gogf:masterfrom
sonnemusk:fix/otelmetric-runtime-version

Conversation

@sonnemusk

Copy link
Copy Markdown

Fixes #4727

go.opentelemetry.io/contrib/instrumentation/runtime changed Version from a function to a string constant in v0.65:

// v0.63
func Version() string { return "0.63.0" }

// v0.65+
const Version = "0.65.0"

go get -u pulls v0.65+ and runtime.Version() no longer compiles.

Change: require v0.65.0 and use runtime.Version (const). Related otel packages bumped by go get.

cd contrib/metric/otelmetric && go test . -count=1

….65+

instrumentation/runtime switched Version from a function to a string
const in v0.65. Calling runtime.Version() fails after go get -u.
Bump the dep and use the const; unit tests pass.

Fixes #4727
@sonnemusk

Copy link
Copy Markdown
Author

Closing to keep only high-signal open PRs. Sorry for the noise.

@sonnemusk sonnemusk closed this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

contrib/metric/otelmetric: 安装otelmetric最新版本时,opentelemetry版本字符串使用string定义,而不是函数,导致报错

1 participant