Search code examples
spring-cloud-sleuthzipkin

Exportable Zipkin/Brave/Spring-Cloud-Sleuth Span cannot be found in Zipkin


I can't find a below exportable Span in Zipkin neither by it's traceId nor by spanId (some other spans appear, so Zipkin server seems to work)

{"timestamp":"2020-08-13 00:48:52.471","level":"INFO","thread":"xxx dispatcher: xxx","mdc":{"traceId":"481bef72295477ac","spanId":"509cdbbac8833590",
"spanExportable":"true","X-Span-Export":"true","X-B3-SpanId":"509cdbbac8833590","X-B3-ParentSpanId":"37eca1021fd5241c","X-B3-TraceId":"481bef72295477ac",
"parentId":"37eca1021fd5241c"},"logger":"xxxService","message":"Sending response xxxMsg to RabbitMQ channel","context":"default"}

I also can't find it's parent "parentId":"37eca1021fd5241c" in Zipkin.

Where can be a problem? How can I bite/debug it?

Possibly this span is in a flow, that was triggered by a rabbit message, not a rest request. Spans from a trace that were triggered by http rest request are correctly visible in Zipkin. But I can't find traces from flows triggered by rabbit message. What problem could be here?


Solution

  • I was using it with default storage which is discouraged in production use, it can handle only small amount of data and can be treated only as a demo version.

    What helped a little was setting

    spring.sleuth.sampler.probability: 0.01

    -- by default it logs all spans.