Skip to content

feat: nico-core w3c trace propagation #2438

@FrankSpitulski

Description

@FrankSpitulski

Is this a new feature, an enhancement, or a change to existing functionality?

New Feature

How would you describe the priority of this feature request

Medium

Please provide a clear description of problem this feature solves

trace propagation at network boundaries allows distributed systems to report unified otel trace context for use by observability and development. w3c is the standard textmap propagator. without trace propagation, traced requests passing through nico are disconnected from the system, effectively breaking the trace.

Feature Description

As an operator of nico, I want nico to both accept and produce w3c compatible tracing headers at network boundaries, so that when combined with my other traced services I can see complete requests across the entire distributed system.

Describe your ideal solution

there are 4 main ingress/egress points that need tracing configuration and validation. REST ingress, GRPC ingress, REST egress, GRPC egress.

start by setting the text map propagator to w3c in the opentelemetry config in setup.rs where otel is currently configured. the default is no-op. then set the injector and extractor to use it.

next the ingress needs to be configured to use the extractor. the grpc and rest listeners appear to be using the same tower layer, so maybe only one extractor is needed but the goal is for both to use an off the shelf (no custom impl) extractor to pull the w3c trace context out of the grpc/http request headers and use that as the traceparent for each request's span.

egress is more involved. outgoing network requests need to use the configured textmap injector to add the w3c context to their headers. there are several grpc and rest clients in use. ForgeTlsClient and NmxcClient using hyper and tonic, and then several instances of reqwest clients (including redfish, token exchange, admin ui oauth, maybe more). these should be configured with off the shelf layers/interceptors where possible to add in these headers (for example https://docs.rs/reqwest-tracing/latest/reqwest_tracing/). if not possible, manual textmap header injection is a last resort.

Describe any alternatives you have considered

No response

Additional context

No response

Code of Conduct

  • I agree to follow NCX Infra Controller's Code of Conduct
  • I have searched the open feature requests and have found no duplicates for this feature request

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature (deprecated - use issue type, but it's needed for reporting now)interest/dsxroadmapRoadmap item with program-level tracking
    No fields configured for Enhancement.

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions