Istio 的采样率如何处理错误?

How Istio's sampling rate works with errors?

我关于 Kubernetes 中的 Istio 的问题。我有 1% 的 Istio 采样率,我有错误不包括在 1% 中。我会在 Jaeger trace 中看到这个错误吗?

我对 Kubernetes 和 Istio 有点陌生。这就是为什么不能自己测试的原因。我一直在玩 Istio 的 Book Application 示例,我想知道我是否会看到带有错误的跟踪,它不包含在 1% 的采样率中。

安装时配置 Istio:

pilot.traceSampling=1

结果想知道我能不能看到不包括在采样率中的错误。如果没有,我如何配置 Istio 才能看到它?

如果您将采样率设置为 1%,那么一旦出现 100 次,Jaeger 就会出现错误。 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

如果您没有看到当前样本中的错误,我建议将样本调高。

您可以阅读有关 Tracing context propagation which is being done by Envoy 的内容。 Envoy 自动将 span 发送给跟踪收集器

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