1. Installation & Setup
-
Install Atatus Node.js package.
-
Require Atatus in your Node.js app and invoke start with your License key and App name:
2. Pass Traceparent In Queue Message
To link an external Redis job API with the current trace context, you need to include thetraceparent value in the job message.
In below example, we are passing the traceparent in the job message so that the child jobs can inherit the tracing context.
3. Get & Set Traceparent in Background Transaction
On the worker server, you’ll need to retrieve thetraceparent value from the incoming job message and use it to link the child job to the parent trace. This will allow you to trace the job across systems.
In this example, we are creating a new background transaction that is linked to the traceparent from the incoming message. This ensures that tracing data is consistently propagated across your system, allowing you to track job processing in the context of the overall trace.