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

Use of outdated OpenTelemetry Go package #106536

Closed
mx-psi opened this issue Nov 18, 2021 · 22 comments · Fixed by #112545
Closed

Use of outdated OpenTelemetry Go package #106536

mx-psi opened this issue Nov 18, 2021 · 22 comments · Fixed by #112545
Assignees
Labels
area/code-organization Issues or PRs related to kubernetes code organization area/dependency Issues or PRs related to dependency changes kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@mx-psi
Copy link

mx-psi commented Nov 18, 2021

What happened?

Importing Kubernetes' k8s.io/apiserver module together with the latest version of go.opentelemetry.io/otel results in a failed build due to breaking changes in the OpenTelemetry Go library. This also happens with k8s.io/component-base.

The solution is to bump the opentelemetry dependencies to a stable version.

What did you expect to happen?

k8s.io/apiserver should be usable in a module that uses a stable version of go.opentelemetry.io/otel

How can we reproduce it (as minimally and precisely as possible)?

A simple way to reproduce it is to create a new Go module via go mod init example.com/kube-issue that depends on the latest version of both k8s.io/apiserver and some new go.opentelemetry.io/otel module, e.g. go.opentelemetry.io/otel/exporters/otlptrace/otlptracegrpc.

main.go contents
package main

import (
	_ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
	_ "k8s.io/apiserver/pkg/endpoints/filters"
)

If you try to do go mod tidy you can see a bunch of errors (which come from breaking changes on the OpenTelemetry Go libraries).

go mod tidy output
❯ go mod tidy
go: finding module for package go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.2.0
go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.2.0
go: found go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc in go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.2.0
go: downloading go.opentelemetry.io/proto/otlp v0.10.0
go: finding module for package go.opentelemetry.io/otel/semconv
go: finding module for package go.opentelemetry.io/otel/unit
go: finding module for package go.opentelemetry.io/otel/internal/metric
go: found go.opentelemetry.io/otel/internal/metric in go.opentelemetry.io/otel/internal/metric v0.25.0
go: finding module for package go.opentelemetry.io/otel/metric/registry
go: finding module for package go.opentelemetry.io/otel/semconv
example.com/kube-issue imports
        k8s.io/apiserver/pkg/endpoints/filters imports
        go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp imports
        go.opentelemetry.io/otel/semconv: module go.opentelemetry.io/otel@latest found (v1.2.0), but does not contain package go.opentelemetry.io/otel/semconv
example.com/kube-issue imports
        k8s.io/apiserver/pkg/endpoints/filters imports
        go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp tested by
        go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.test imports
        go.opentelemetry.io/otel/oteltest imports
        go.opentelemetry.io/otel/metric/registry: module go.opentelemetry.io/otel/metric@latest found (v0.25.0), but does not contain package go.opentelemetry.io/otel/metric/registry

Anything else we need to know?

Probably @dashpole is the right person to address this (but I am happy to help with it!)

Kubernetes version

Any version that includes #94942, that is, v0.22.0 or later.

Cloud provider

n/a

OS version

n/a

Install tools

Container runtime (CRI) and and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

@mx-psi mx-psi added the kind/bug Categorizes issue or PR as related to a bug. label Nov 18, 2021
@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 18, 2021
@mx-psi
Copy link
Author

mx-psi commented Nov 18, 2021

/sig instrumentation

@k8s-ci-robot k8s-ci-robot added sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 18, 2021
@mx-psi
Copy link
Author

mx-psi commented Nov 18, 2021

/area dependency

@k8s-ci-robot k8s-ci-robot added the area/dependency Issues or PRs related to dependency changes label Nov 18, 2021
@mx-psi
Copy link
Author

mx-psi commented Nov 18, 2021

This depends on etcd being bumped to a version that includes etcd-io/etcd#13361 (funnily enough, this issue was mentioned on etcd-io/etcd#13361 (comment)).

@ehashman
Copy link
Member

/area code-organization
/sig architecture
/assign @dashpole

I believe this is by design due to API incompatibilities and limitations; we cannot use the latest version of the package.

@k8s-ci-robot k8s-ci-robot added area/code-organization Issues or PRs related to kubernetes code organization sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. labels Nov 18, 2021
@ehashman
Copy link
Member

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 18, 2021
@liggitt liggitt added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed kind/bug Categorizes issue or PR as related to a bug. labels Nov 25, 2021
@NikhilSharmaWe
Copy link
Member

@ehashman I would like to collaborate to change the OpenTelemetry package to a stable version in k8s.io/apiserver and k8s.io/component-base Could you please give me some direction what steps can I take to find out what will be appropriate version to use at place of v0.20.0.

@dashpole
Copy link
Contributor

This needs a release of etcd before we can update the opentelemetry dependency. See etcd-io/etcd#13361 (comment)

@dims
Copy link
Member

dims commented Dec 23, 2021

@NikhilSharmaWe as @dashpole mentioned, please update etcd and possibly containerd as well before we can move up. we'll need released versions (tags) of those projects

@NikhilSharmaWe
Copy link
Member

/assign

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@dashpole
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 23, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 21, 2022
@dashpole
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 21, 2022
@ityuhui
Copy link

ityuhui commented Jun 29, 2022

Hi developers

Is this work still on going?

@mx-psi
Copy link
Author

mx-psi commented Jun 29, 2022

@ityuhui This is still not fixed; it is blocked by upgrading the etcd version to the 3.6.x series

@ityuhui
Copy link

ityuhui commented Jun 29, 2022

Thank you @mx-psi !

May I know the etcd upgrade progress ? ( e.g. an issue or PR link )

I'd like to contribute since I need this upgrade for OpenTelemetry in Kubernetes repo to resolve some security vulnerabilities.

@mx-psi
Copy link
Author

mx-psi commented Jun 29, 2022

I am afraid my knowledge ends here :) Maybe @dashpole can help answer that?

@dashpole
Copy link
Contributor

dashpole commented Jul 11, 2022

etcd-io/etcd#13538 tracks the release, and references "data inconsistency" as blocking the release, which I believe is etcd-io/etcd#14039. That is part of etcd-io/etcd#14138, which is (I think) where work is being done right now

@Ishmeet
Copy link

Ishmeet commented Aug 9, 2022

any workaround ?

@kaiyou
Copy link

kaiyou commented Sep 18, 2022

It seems etcd just backported and merged otel 1.x support in 3.5 : etcd-io/etcd#14312

I believe we can try and make this work without waiting for etcd 3.6!

@dims
Copy link
Member

dims commented Sep 18, 2022

See here @kaiyou @dashpole - #112545

@kaiyou
Copy link

kaiyou commented Sep 18, 2022

Oh thank you, I was already head down on the same track. I'll try and help with the PR if I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/code-organization Issues or PRs related to kubernetes code organization area/dependency Issues or PRs related to dependency changes kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet