From the course: Mastering Observability with OpenTelemetry

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Exporting spans to Jaeger

Exporting spans to Jaeger

- [Instructor] So Jaeger is now listening on port 4317 and 4318 for incoming requests. 4317 is GRPC, a streaming protocol, and 4318 is regular HTTP. Now we have to change our node and python services to send data to one of these endpoints. Let's start with node. For that, I will now open first the package.json file. And when you scroll down here to line 13, you see that we already have the OTP exporter for traces as a dependency. So we are all good there. Now we have to change the code so that we also are really in fact exporting. For that, I'm now opening index.js, and there I can remove the console span exporter already in. And now add const, curly brackets because this is a destructuring assignment. OTLPTraceExporter equals require at open telemetry and then IntelliSense should already propose the trace exporter to you. Don't take the metrics exporter, take the trace exporter here. So right, I save this, and now I also have to tell the node SDK to use this trace exporter. For that,…

Contents