Skip to content

Propagate OpenTelemetry context in outgoing plugin RPCs #13112

@HASidd

Description

@HASidd

What is the problem you're trying to solve

Current OpenTelemetry support in containerd is incomplete regarding the plugin ecosystem. While the daemon correctly handles incoming gRPC requests via server-side interceptors and exports spans via OTLP, it does not propagate the trace context to outgoing RPCs made to proxy plugins (such as custom snapshotters).

This results in "broken" traces; observability ends at the containerd boundary, making it impossible to correlate daemon operations with the internal logic of external plugins. For developers of custom snapshotters, this lack of context propagation prevents full end-to-end distributed tracing.

Describe the solution you'd like

I would like containerd to implement client-side OpenTelemetry instrumentation for all outgoing gRPC calls to proxy plugins.

Specifically, this involves integrating otelgrpc.NewClientHandler() into the gRPC client initialization for plugins. By adding this handler, containerd will automatically inject the active trace context into the outgoing request metadata, allowing downstream plugins to continue the span and provide a complete picture of the request lifecycle.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions