Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go.opentelemetry.io/otel/semconv version error #5839

Open
dongjiang1989 opened this issue Sep 24, 2024 · 2 comments
Open

go.opentelemetry.io/otel/semconv version error #5839

dongjiang1989 opened this issue Sep 24, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dongjiang1989
Copy link

Description

A clear and concise description of what the bug is.

$ go mod tidy
go: finding module for package go.opentelemetry.io/otel/semconv/v1.21.0
go: finding module for package go.opentelemetry.io/otel/semconv/v1.17.0
go: kubesphere.io/kubesphere/pkg/apiserver/dispatch imports
	k8s.io/apiserver/pkg/endpoints/handlers/responsewriters imports
	k8s.io/component-base/tracing imports
	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp imports
	go.opentelemetry.io/otel/semconv/v1.17.0: module go.opentelemetry.io/otel@latest found (v1.30.0, replaced by go.opentelemetry.io/[email protected]), but does not contain package go.opentelemetry.io/otel/semconv/v1.17.0
go: kubesphere.io/kubesphere/pkg/apiserver/dispatch imports
	k8s.io/apiserver/pkg/endpoints/handlers/responsewriters imports
	k8s.io/component-base/tracing imports
	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp imports
	go.opentelemetry.io/otel/metric tested by
	go.opentelemetry.io/otel/metric.test imports
	go.opentelemetry.io/otel/semconv/v1.21.0: module go.opentelemetry.io/otel@latest found (v1.30.0, replaced by go.opentelemetry.io/[email protected]), but does not contain package go.opentelemetry.io/otel/semconv/v1.21.0

Environment

  • OS: [e.g. iOS]
  • Architecture: [e.g. x86, i386] x86
  • Go Version: [e.g. 1.15] 1.19
  • opentelemetry-go version: [e.g. v0.14.0, 3c7face] v1.11.2

Steps To Reproduce

  1. Use the configuration '...'
  2. Run '...'
  3. See error

Expected behavior

A clear and concise description of what you expected to happen.

@dongjiang1989 dongjiang1989 added the bug Something isn't working label Sep 24, 2024
@dongjiang1989
Copy link
Author

When specifying the version go.opentelemetry.io/otel/semconv v1.23.0

go: downloading go.opentelemetry.io/otel/semconv v1.23.0
go: kubesphere.io/kubesphere/pkg/apiserver/dispatch imports
	k8s.io/apiserver/pkg/endpoints/handlers/responsewriters imports
	k8s.io/component-base/tracing imports
	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp imports
	go.opentelemetry.io/otel/semconv/v1.17.0: reading go.opentelemetry.io/otel/semconv/go.mod at revision semconv/v1.23.0: unknown revision semconv/v1.23.0
go: kubesphere.io/kubesphere/pkg/apiserver/dispatch imports
	k8s.io/apiserver/pkg/endpoints/handlers/responsewriters imports
	k8s.io/component-base/tracing imports
	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp imports
	go.opentelemetry.io/otel/metric tested by
	go.opentelemetry.io/otel/metric.test imports
	go.opentelemetry.io/otel/semconv/v1.21.0: reading go.opentelemetry.io/otel/semconv/go.mod at revision semconv/v1.23.0: unknown revision semconv/v1.23.0

@dmathieu
Copy link
Member

From the message in your description:

(v1.30.0, replaced by go.opentelemetry.io/[email protected])

Something in your dependency tree makes you rely on otel 1.11.2, which is from 2 years ago, and predates semconv 1.21.
You need to ensure you're indeed using a recent version of the SDK, so semconv is indeed there.

What is the content of go.mod?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants