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
OpenCensus Agent not honoring a deny sampling decision for traces #50837
Comments
cc @lei-tang |
FWIW, OpenCensus is deprecated. The OpenCensus related features will be removed from Istio. Related discussion in #50808. |
@lei-tang Is there an alternative solution in Istio that permits this then?
|
you should use zipkin or maybe move to OpenTelemetry? |
Well I mean we have some services in our mesh that use zipkin instrumentation with B3 and others use opentelemetry instrumentation with W3C. Is there another way in istio, besides opencensus, that allows those services to participate in the same trace if they are propagating different headers? The reason we use the opencensus agent is so we don’t have disjoint traces in that scenario. |
AFAIK, besides opencensus, Istio currently does not have an alternative that permits this. |
What would you recommend in our case then? Could we configure and set two trace providers in istio (both zipkin and opentelemetry), but only one can be used at a time right? I'm assuming this issue in opencensus won't actually get fixed, considering its being fully removed soon. |
with telemetry API, you van use different trace provider for different workloads/services, is that help you? |
@zirain Yep I understand that, thanks. It doesn't accomplish our use case of interoperability between services that use different headers, but it seems it is the best option we'll have in istio. |
Is this the right place to submit this?
Bug Description
We are using the opencensus agent for tracing so that we can support both B3 and W3C trace headers in the same trace.
Sometimes, for testing and debugging purposes, we need to override the trace headers in requests to force or deny sampling.
However, when using the opencensus agent, we notice that a deny sampling decision
X-B3-Sampled: 0
is not always honored. Similarly, for W3C, usingtraceparent: 00-0af7651916cd43dd8448eb211c80312d-00f067aa0ba902b7-00
is also not always honored. Inversely, forcing sampling to be 100% is always honored.I also tested this behavior using the zipkin tracer instead and it worked correctly. Using
X-B3-Sampled: 0
successfully forced a deny sampling decision 100% of the time. So it seems the inconsistent sampling on a deny decision only happens when using opencensus.Version
Additional Information
It can be reproduced by the following:
X-B3-Sampled
andtraceparent
headersX-B3-Sampled: 1
andtraceparent: 00-0af7651916cd43dd8448eb211c80312d-00f067aa0ba902b7-01
and see that traces are sampled 100% of the timeThe text was updated successfully, but these errors were encountered: