libcni: add OpenTelemetry trace context propagation - #1173
Merged
MikeZappa87 merged 1 commit intoAug 13, 2026
Conversation
jipperinbham
force-pushed
the
feat/otel-tracing
branch
from
November 10, 2025 02:33
c031088 to
235e549
Compare
jipperinbham
added a commit
to jipperinbham/go-cni
that referenced
this pull request
Nov 10, 2025
Creates a span for each interface function where context.Context is available and additional creates child spans for the critical attach functions for each network being created. Goes along with containernetworking/cni#1173 to provide end-to-end traces for setting up CNI.
jipperinbham
added a commit
to jipperinbham/go-cni
that referenced
this pull request
Nov 10, 2025
Creates a span for each interface function where context.Context is available and additional creates child spans for the critical attach functions for each network being created. Goes along with containernetworking/cni#1173 to provide end-to-end traces for setting up CNI.
jipperinbham
added a commit
to jipperinbham/go-cni
that referenced
this pull request
Nov 10, 2025
Creates a span for each interface function where context.Context is available and additional creates child spans for the critical attach functions for each network being created. Goes along with containernetworking/cni#1173 to provide end-to-end traces for setting up CNI. Signed-off-by: JP Phillips <jonathanphillips@netflix.com>
squeed
approved these changes
Nov 10, 2025
jipperinbham
commented
Nov 10, 2025
mxpv
pushed a commit
to jipperinbham/go-cni
that referenced
this pull request
Aug 4, 2026
Creates a span for each interface function where context.Context is available and additional creates child spans for the critical attach functions for each network being created. Goes along with containernetworking/cni#1173 to provide end-to-end traces for setting up CNI. Signed-off-by: JP Phillips <jonathanphillips@netflix.com>
Contributor
|
@jipperinbham can you fix the linter and we can move this forward? |
jipperinbham
added a commit
to jipperinbham/go-cni
that referenced
this pull request
Aug 7, 2026
Creates a span for each interface function where context.Context is available and additional creates child spans for the critical attach functions for each network being created. Goes along with containernetworking/cni#1173 to provide end-to-end traces for setting up CNI. Signed-off-by: JP Phillips <jonathanphillips@netflix.com>
This enables distributed tracing support by passing span identifiers from the caller to CNI plugins through environment variables. When a valid span context exists, it is propagated using the TRACEPARENT, TRACESTATE, and BAGGAGE environment variables following the OpenTelemetry specification (OTEP 0258). This allows CNI plugins to participate in distributed traces, helping with performance analysis and debugging across the plugin execution lifecycle. Fixes containernetworking#561 Signed-off-by: JP Phillips <jonathanphillips@netflix.com>
jipperinbham
force-pushed
the
feat/otel-tracing
branch
from
August 7, 2026 19:08
235e549 to
beb7d36
Compare
jipperinbham
added a commit
to jipperinbham/go-cni
that referenced
this pull request
Aug 7, 2026
Creates a span for each interface function where context.Context is available and additional creates child spans for the critical attach functions for each network being created. Goes along with containernetworking/cni#1173 to provide end-to-end traces for setting up CNI. Signed-off-by: JP Phillips <jonathanphillips@netflix.com>
Contributor
Author
|
@MikeZappa87 thanks for the ping! I've updated this work and containerd/go-cni#132 to having passing CI. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This enables distributed tracing support by passing span identifiers from the caller to CNI plugins through environment variables. When a valid span context exists, it is propagated using the TRACEPARENT, TRACESTATE, and BAGGAGE environment variables following the OpenTelemetry specification OTEP 0258.
This allows CNI plugins to participate in distributed traces, helping with performance analysis and debugging across the plugin execution lifecycle. I does not create any spans and instead leaves that responsibility to the caller and CNI plugins. Below is an example for extracting the trace context via environment variables:
Fixes #561