0

I also want to trace network latency from App -> Service1 -> App -> Service2.
Spring sleuth works perferct to find latency between Sleuth aware services say services1->service2 as I can see CS,SR tags in Zipkin. Now I also want to track network Latency between devices and other area which we are hopping but those are not Sleuth aware services. How can I do that. Any pointers would be appreciated .

From the Docs,

That means that the current span has Trace-Id set to X, Span-Id set to D. It also has emitted Client Sent event.

Are there any specific headers which needs to be sent from App to Server?

I know Sleuth does it out of the box using Rest template. How can I do the same thing from Apps or other non sleuth services.

Community
  • 1
  • 1
Art
  • 414
  • 7
  • 24
  • How did you manage to resolve issue for non sleuth service? – Rahul Singh Feb 25 '18 at 17:19
  • @RahulSingh you need to resolve this by using Brave if using Java code for non sleuth project. Spring Sleuth 2.0 will also be using Brave library. So, you create a Trace from Non sleuth and pass it to sleuth, passing through headers is taken care by Brave, and sleuth will honour those headers and act accordingly. – Art Feb 25 '18 at 19:28
  • thanks for the info. Actually please correct me , I have a spring boot application and it is sleuth aware service and it is deployed to pivotal cloud foundry now that application gives rest call to third party service which is not on pcf so in this case if I see trace then I am unable to capture proper span id across request. So you mean to say i need to modify on thire party service side for properly capturing headers and returing it? – Rahul Singh Feb 26 '18 at 02:07
  • If third party is not sleuth Aware then offcourse tracing will not happen there...although you will get timing of the call also it will not be shown in dependency in zipkin if TP is not sleuth aware.. – Art Feb 26 '18 at 07:53
  • Thanks a lot for information. – Rahul Singh Feb 28 '18 at 05:04

1 Answers1

0

Please read this page from Zipkin - https://zipkin.io/pages/instrumenting.html . It's all written there how things should work.

HTTP Tracing

HTTP headers are used to pass along trace information.

The B3 portion of the header is so named for the original name of Zipkin: BigBrotherBird.

Ids are encoded as hex strings:

X-B3-TraceId: 128 or 64 lower-hex encoded bits (required)
X-B3-SpanId: 64 lower-hex encoded bits (required)
X-B3-ParentSpanId: 64 lower-hex encoded bits (absent on root span)
X-B3-Sampled: Boolean (either “1” or “0”, can be absent)
X-B3-Flags: “1” means debug (can be absent)
For more information on B3, please see its specification.

Also please check the B3 specification page - https://github.com/openzipkin/b3-propagation

Marcin Grzejszczak
  • 10,624
  • 1
  • 16
  • 32