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

Support for legacy Cloud Trace propagation header #447

Open
bambuchaAdm opened this issue May 24, 2024 · 1 comment
Open

Support for legacy Cloud Trace propagation header #447

bambuchaAdm opened this issue May 24, 2024 · 1 comment
Labels
enhancement New feature or request general General issue, not specific to a particular contrib good first issue Good for newcomers help wanted Extra attention is needed instrumentation:nginx Nginx module

Comments

@bambuchaAdm
Copy link

Describe your environment

We are using this module as part of ingress-nginx under Global application load balancer on Google Cloud Platform.
What was heavy used feature by us was connection of logged request by LB had connected tracing information.
As GCLB supports right now only legacy trace propagation mechanism and there is no immediate view on updates to WC3 standards we would like to add support for understanding X-Cloud-Trace-Context for nginx tracing at least on input.

As otel module for nginx does not understood that trace exist on request it create new one and propagated using WC3 headers. Our application are implemented with guidlines to prefere WC3 over legacy traces and this "disconnects" traces from LB from other system trace.

Versios:
Ingress-Nginx helm chart version: 4.10.0
Ingress-Nginx: v1.10.0
Nginx: 1.25.3
k8s: v1.29.1-gke.1589020
opentelemetry-contrib-cpp: aaa51e2

Steps to reproduce
Deploy nginx under Classic Global Load balancer. Traces would differ between request and upstream of it. As consequence logs would also does not appear under same trace.

What is the expected behavior?
Have ability to switch input to understood legacy Cloud Trace Format

What is the actual behavior?
Legacy Cloud Trace propagation header is ignored

Additional context
I put report about Import/Export implementation to main library to not duplicate code as probably there are still services that are understood/produce only legacy traces open-telemetry/opentelemetry-cpp#2683

@marcalff
Copy link
Member

Thanks for the report, labeling as a feature request.

Guidelines for submitting a PR to implement this feature below.


To support X-Cloud-Trace-Context propagation headers, it is necessary to implement a custom propagator for this header format.

This propagator should be:

  • implemented in the opentelemetry-cpp-contrib repository (a.k.a, here)
  • placed under a (new, to create) propagators directory

A custom propagator implementation consists of a subclass of class opentelemetry::context::propagation::TextMapCarrier from the opentelemetry-cpp API

To use this custom propagator in an application, use opentelemetry::context::propagation::GlobalTextMapPropagator::SetGlobalPropagator() to set the global propagator singleton.

@marcalff marcalff added general General issue, not specific to a particular contrib enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request general General issue, not specific to a particular contrib good first issue Good for newcomers help wanted Extra attention is needed instrumentation:nginx Nginx module
Projects
None yet
Development

No branches or pull requests

2 participants