Skip to content

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Dec 1, 2025

The otelgrpc.UnaryClientInterceptor and otelgrpc.StreamClientInterceptor options were deprecated and removed in favor of NewClientHandler.

The otelgrpc.UnaryClientInterceptor and otelgrpc.StreamClientInterceptor
options were deprecated and removed in favor of NewClientHandler.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

@cpuguy83 I see you added the //nolint comments in #10186, but it looks like these functions have now been removed in OTEL, and (apparently) this should be the replacement. Not sure how to verify fi this all works as intended though; perhaps you could have a look?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the containerd codebase to use the new OpenTelemetry gRPC instrumentation API by replacing deprecated interceptor functions with the modern stats handler approach.

  • Replaces otelgrpc.UnaryClientInterceptor() and otelgrpc.StreamClientInterceptor() with otelgrpc.NewClientHandler()
  • Removes obsolete nolint:staticcheck directives that were suppressing deprecation warnings
  • Updates documentation to reflect the new API usage

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
core/runtime/v2/shim.go Updates gRPC client connection setup to use the new otelgrpc.NewClientHandler() instead of deprecated interceptors
docs/tracing.md Updates the client tracing example to demonstrate the new API usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cpuguy83
Copy link
Member

cpuguy83 commented Dec 1, 2025

Seems correct.

@thaJeztah thaJeztah marked this pull request as ready for review December 1, 2025 16:39
@dosubot dosubot bot added the area/runtime Runtime label Dec 1, 2025
@thaJeztah thaJeztah added cherry-pick/2.1.x Change to be cherry picked to release/2.1 branch cherry-pick/2.2.x Change to be cherry picked to release/2.2 branch and removed area/runtime Runtime labels Dec 1, 2025
@thaJeztah
Copy link
Member Author

Thanks! Let me move this one out of draft 👍

@dmcgowan dmcgowan moved this from Needs Triage to Review In Progress in Pull Request Review Dec 1, 2025
@mxpv mxpv added this pull request to the merge queue Dec 1, 2025
Merged via the queue into containerd:main with commit 017ae81 Dec 1, 2025
58 checks passed
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in Pull Request Review Dec 1, 2025
@thaJeztah thaJeztah deleted the otel_deprecations branch December 4, 2025 08:27
@thaJeztah
Copy link
Member Author

/cherry-pick release/2.2

@thaJeztah
Copy link
Member Author

/cherry-pick release/2.1

@k8s-infra-cherrypick-robot

@thaJeztah: new pull request created: #12622

Details

In response to this:

/cherry-pick release/2.2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-infra-cherrypick-robot

@thaJeztah: new pull request created: #12623

Details

In response to this:

/cherry-pick release/2.1

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@austinvazquez austinvazquez added cherry-picked/2.1.x PR commits are cherry picked into the release/2.1 branch cherry-picked/2.2.x PR commits are cherry-picked into release/2.2 branch and removed cherry-pick/2.1.x Change to be cherry picked to release/2.1 branch cherry-pick/2.2.x Change to be cherry picked to release/2.2 branch labels Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/2.1.x PR commits are cherry picked into the release/2.1 branch cherry-picked/2.2.x PR commits are cherry-picked into release/2.2 branch size/XS

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants