2

我在 Istio 网站上做了一个类似于 bookinfo 应用程序的简单的 3 层服务。除了使用 zipkin 或 jaeger 进行跟踪外,一切似乎都运行良好。

澄清一下,我有 3 个服务 S1、S2、S3,它们都非常相似且微不足道,向下游传递请求并做一些工作。我可以在跟踪中看到 S1 和 S2,但看不到 S3。我进一步缩小了范围,当我使用 Istio 版本 0.5.0 时,我也可以在跟踪中看到 S3,但只是过了一段时间,但是,使用 Istio 版本 0.5.1,我只能看到 S1 和 S2在跟踪中,即使服务正常工作并且调用一直向下传播到 S3。

我能看到的唯一区别(我不确定这是否是一个问题)是 istio-proxy 中使用 istio 版本 0.5.0 的 S3 输出,但不是 0.5.1

“GET /readiness HTTP/1.1” 200 - 0 39 1 1 “-” “kube-probe/1.9+” “0969a5a3-f6c0-9f8e-a449-d8617c3a5f9f” “10.XX18:8080” “127.0.0.1:8080”

如果需要,我可以添加确切的 yaml 文件。此外,我不确定跟踪是否应该来自 istio-proxy,正如它在 istio 文档中显示的那样,但就我而言,我没有看到 istio-proxy,而只看到了 istio-ingress。

4

1 回答 1

0

跟踪上下文传播可能会丢失。

https://istio.io/docs/tasks/observability/distributed-tracing/overview/#trace-context-propagation

Although Istio proxies are able to automatically send spans, they need some hints to tie together the entire trace. Applications need to propagate the appropriate HTTP headers so that when the proxies send span information, the spans can be correlated correctly into a single trace.

To do this, an application needs to collect and propagate the following headers from the incoming request to any outgoing requests:

x-request-id
x-b3-traceid
x-b3-spanid
x-b3-parentspanid
x-b3-sampled
x-b3-flags
x-ot-span-context

Additionally, tracing integrations based on OpenCensus (e.g. Stackdriver) propagate the following headers:

x-cloud-trace-context
traceparent
grpc-trace-bin
于 2019-12-30T01:11:09.510 回答