0

I have three services A, B, and C that communicate like so

       HTTP       HTTP
   A +------> B +------> C
nodejs      nodejs      java

I'm using OpenTracing and Jaeger for distributed tracing. The problem is these services are in different languages, but I'm still trying to propagate the information that A is the parent span so that the span tree looks like this.

A +----------------+
B +-------+
C         +--------+

Right now, A, B, and C are being reported as individual traces with no causality relations. All the examples I've seen involved propagating causality between different microservices in the same language and in the same project build. None involved entirely separate services.

rgarci0959
  • 539
  • 1
  • 4
  • 8

1 Answers1

0

It doesn't really matter in which language your individual microservices are written, you should see them all in the same trace. Given that you are seeing three traces instead of one trace with three spans, it appears that the context propagation isn't working. Check your HTTP client in your nodejs services, they should perform the "inject" operation. Your service "B" and "C" should then perform the "extract" operation.

If you haven't yet, check Yuri Shkuro's OpenTracing Tutorial. The lesson 3 is about the context propagation, including the inject and extract operations.

I'm not quite sure how it works in the NodeJS world, but in Java, it should be sufficient to have the opentracing-contrib/java-web-servlet-filter instrumentation library in your classpath, as it would register the necessary pieces in the right hooks and make the trace context available for each incoming HTTP request.

jpkroehling
  • 13,881
  • 1
  • 37
  • 39