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

semconv: Backwards compatibility with v0 with v1? #2577

Closed
trynity opened this issue Feb 2, 2022 · 8 comments
Closed

semconv: Backwards compatibility with v0 with v1? #2577

trynity opened this issue Feb 2, 2022 · 8 comments
Labels
enhancement New feature or request
Milestone

Comments

@trynity
Copy link

trynity commented Feb 2, 2022

Problem Statement

The refactoring of semconv has lead to some interesting problems when attempting to vendor multiple dependencies for our codebase.

While v0 versions per Semantic Versioning are inherently unstable, having backwards compatibility with v0 while on v1 would be extremely helpful, as Go Modules do not currently keep two separate versions when it's v0/v1, and only do that for later versions.

Proposed Solution

Including the previously deleted code for semconv in the directory in which it used to live, would allow folks who still have packages which depend on v0 versions of otel live simultaneously with code that depends on newer versions.

Alternatives

I have also filed an issue for etcd for the particular issue I'm encountering, but also asking here as a more general solution: etcd-io/etcd#13664

@trynity trynity added the enhancement New feature or request label Feb 2, 2022
@MrAlias
Copy link
Contributor

MrAlias commented Feb 3, 2022

cc @dashpole

@dashpole
Copy link
Contributor

dashpole commented Feb 4, 2022

This is the same situation we have in the kubernetes/kubernetes codebase as well. We have a dependency on Etcd, which hasn't released a new minor release in a while, and are stuck on a v0 release of otel-go. Etcd's v3.6.0 release should be happening quite soon according to etcd-io/etcd#13538, after which we will both be unblocked.

@dashpole
Copy link
Contributor

dashpole commented Feb 4, 2022

I think the right answer here is probably to sit tight for a few weeks while we wait for them to release. If we did want to make v1 backwards-compatible with v0, it would take a lot more than semconv to make that work, and I don't think that makes sense in this case.

@yue9944882
Copy link

yue9944882 commented Feb 23, 2022

IIUC the compatibility seems permanently broken for the package go.opentelemetry.io/otel/internal/metric. when i was trying to forcibly downgrade all of my otel dependencies to the old good v0.20.0, go mod command halted at "ambiguous import" b/c the package cut a v0.26.0 release and it's conflicting w/ the old one. so i had to upgrade all of them to v1. with that being said, i think otel pkgs before v0.26.0 release are no longer available via go mod.

$ go mod tidy
...
        k8s.io/apiserver/pkg/registry/generic imports
        k8s.io/apiserver/pkg/storage/storagebackend/factory imports
        k8s.io/component-base/traces imports
        go.opentelemetry.io/otel/exporters/otlp imports
        go.opentelemetry.io/otel/sdk/metric/controller/basic imports
        go.opentelemetry.io/otel/sdk/metric imports
        go.opentelemetry.io/otel/internal/metric: ambiguous import: found package go.opentelemetry.io/otel/internal/metric in multiple modules:
        go.opentelemetry.io/otel v1.3.0 (/Users/zuoxiu.jm/go/pkg/mod/go.opentelemetry.io/[email protected]/internal/metric)
        go.opentelemetry.io/otel/internal/metric v0.26.0 (/Users/zuoxiu.jm/go/pkg/mod/go.opentelemetry.io/otel/internal/[email protected])

UPDATE: i failed unwind by upgrade either, b/c k8s apiserver library relies on go.opentelemetry.io/otel/semconv of which the compatibility is also broken. https://github.com/kubernetes/apiserver/blob/master/pkg/server/options/tracing.go#L28. i think any thirdparty repos that import k8s.io/apiserver will run into this thread..

@mx-psi
Copy link
Member

mx-psi commented Feb 23, 2022

So that things are cross-linked, here is the related Kubernetes issue: kubernetes/kubernetes#106536

@mrsufgi
Copy link

mrsufgi commented Apr 12, 2022

for those with issues here - the 3.6.0-alpha.0 of etcd is out. solved my dependencies issues.

@MrAlias
Copy link
Contributor

MrAlias commented May 3, 2022

for those with issues here - the 3.6.0-alpha.0 of etcd is out. solved my dependencies issues.

Closing as the underlying issue looks resolved. Please reopen if this is in error.

@vitaminmoo
Copy link

For anyone hitting this on etcd v3.5.x - Upgrade to at least v3.5.5 and the otel deps have been bumped upstream. No need to run the 3.6.0 alpha.

@XSAM XSAM added this to the untracked milestone Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants