Istio Enable 100% Tracing for particular requests only

I’m looking for a way to enable 100% tracing in istio only for requests with particular url or header. And for the other requests trace sampling can either be 1% or even 0%.

Is it possible to achieve this in istio?

Currently I have seen the global level sampling rate that gets applied to all the requests.

Any one having idea about this or have done this type of task before, please share your findings.

I don’t believe it can be done by trying to match on request headers or path, etc… could be wrong. My suggestion is to try see what you can accomplish with what Envoy can do out of the box (https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/observability/tracing#how-to-initiate-a-trace) and see if that will suffice for your usecase. For example, there are some headers that can trigger traces.

1 Like

Thanks @ceposta for the suggestion.