Search code examples
node.jsuber-apiopentracingjaeger

uber/jaeger-client-node: backend wont receive data


I'm currently looking into different openTracing Tracer-Implementations. I want to use uber/jaeger-client-node but the backend won't receive my traces.

Here is what I did: I started the all-in-one docker image: docker run -d -p5775:5775/udp -p16686:16686 jaegertracing/all-in-one:latest

Next, i wrote a simple example application: Gist

But when I go to Jaeger UI, nothing is shown about the example service. What did I do wrong?

Thanks


Solution

  • There are two issues here. One is that your code sets the port for Jaeger client to 5775. This port expects a different data model than what Node.js client sends, you can remove the agentHost and agentPort parameters and rely on defaults.

    The second issue is that you're running the Docker image without exposing the required UDP port. The correct command is shown in the documentation, as of today it should be this (one long line):

    docker run -d -p5775:5775/udp -p6831:6831/udp -p6832:6832/udp \
        -p5778:5778 -p16686:16686 -p14268:14268 jaegertracing/all-in-one:latest