Istio追踪问题

时间:2018-02-14 18:39:59

标签: tracing zipkin istio

我已经制作了类似于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版本0.5.0在S3的istio-proxy中输出,但不是在0.5.1

“GET / readyiness 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。

1 个答案:

答案 0 :(得分: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
相关问题