How Istio's sampling rate works with errors?

10/4/2019

My question about Istio in Kubernetes. I have Istio sample rate of 1% and I have error which is not included in 1%. Would I see in Jaeger trace for this error?

I kind of new to Kubernetes and Istio. That's why can't tested on my own. I have been playing with Istio's example of Book Application and I wonder would I see trace with error which not included in 1% of sample rate.

Configure Istio when installing with:

pilot.traceSampling=1

As result want to know can I see error which not included in sample rate. If no, how I configure Istio to see it if possible?

-- DO IT
istio
jaeger
kubernetes
kubernetes-helm

1 Answer

10/7/2019

If you have sampling rate set to 1% then error will be seen in Jaeger once it occurs 100 times. This is mentioned at Distributed Tracing - Jaeger:

To see trace data, you must send requests to your service. The number of requests depends on Istio’s sampling rate. You set this rate when you install Istio. The default sampling rate is 1%. You need to send at least 100 requests before the first trace is visible. To send a 100 requests to the productpage service, use the following command:

$ for i in `seq 1 100`; do curl -s -o /dev/null http://$GATEWAY_URL/productpage; done

If you are not seeing the error in the current sample, I would advice make the sample higher.

You can read about Tracing context propagation which is being done by Envoy. Envoy automatically sends spans to tracing collectors

Alternatively the trace context can be manually propagated by the service:

-- Crou
Source: StackOverflow