Lambda Node.js tracer FAQ

❗️

Note

AWS is rolling out an update that may collide with old versions of Lumigo Node.js tracers.

A Node.js tracer version that has not been updated might disrupt your AWS environment as well as your ability to use the Lumigo platform.

To update your Node.js tracer version to version 1.80.1 or later you can follow the documentation, or contact us.

Does this affect tracers of runtimes other than Node?
No it doesn’t, only Node.js Lambda tracers need to be updated.

To what version should I update my tracer?
To the latest version (1.80.1 or later).

How can I update my tracer?
To update your Node.js tracer versions you can follow the documentation, or contact us.

I use auto-tracing, do I also need to update?
Yes, all Node.js Lambdas functions with Lumigo tracer need to be updated. Since you’re using auto-tracing, you can easily do it right from your Lumigo UI.

Where can I find that I updated the tracer to the latest version?
To view the tracer version you're currently using go to the Functions, and hover over the Traced toggle to view the tracer version of the function.

To view functions that require updating their tracer, go to the Functions page. Functions that need to be updated will be marked in red.

📘

I updated the function, but Lumigo still shows an older tracer version. Why?

Lumigo KNOWS that a function has been updated to a new tracer version only when it receives a trace with the new tracer. This is the case even if a Lumigo layer is configured on the function, because your function might have a different @lumigo/tracer package in the dependencies in node_modules.

📘

Verifying the tracer version and LUMIGO_SWITCH_OFF

If your function has the LUMIGO_SWITCH_OFF=true environment variable or uses the switchOff option of the lumigo.trace function (in case of manual tracing), no trace data will be sent to Lumigo, so Lumigo cannot verify that the tracer has actually been updated.

📘

Verifying the tracer was removed from unmonitored functions

Lumigo automatically monitors all Lambda function in your AWS account, however you may specify which Lambda functions you want to monitor by using regex filters.

Note that unmonitored functions with Node.js tracer version 1.80.0 or earlier may fail, therefore, removing functions from the list of monitored functions is not enough and you must remove the the tracer as well.

Can you provide more details about the change?
AWS is in the process of rolling out a change to the format of the AWS Lambda environment variable X-AMZN-TRACE-ID in all regions. The change might cause Lambda functions with the Lumigo Node.js tracer v1.80.0 and below to fail when invoked. Therefore, it is critical that you update the tracers on your Node.js functions to the latest version to avoid service disruption.

How do I know that the Lambda function failed because of an older tracer?
You will find an error similar to the following inside Lumigo and in your logs:

Error: Expected 3 semi-colon separated parts in _X_AMZN_TRACE_ID.
    at Object.getTraceId (/opt/nodejs/node_modules/@lumigo/tracer/dist/utils.js:77:15)
    at Object.getSpanInfo (/opt/nodejs/node_modules/@lumigo/tracer/dist/spans/awsSpan.js:35:27)
    at Object.getCurrentTransactionId (/opt/nodejs/node_modules/@lumigo/tracer/dist/spans/awsSpan.js:40:20)
    at Object.getFunctionSpan (/opt/nodejs/node_modules/@lumigo/tracer/dist/spans/awsSpan.js:90:33)
    at /opt/nodejs/node_modules/@lumigo/tracer/dist/tracer/tracer.js:101:50
    at step (/opt/nodejs/node_modules/@lumigo/tracer/dist/tracer/tracer.js:33:23)
    at Object.next (/opt/nodejs/node_modules/@lumigo/tracer/dist/tracer/tracer.js:14:53)
    at /opt/nodejs/node_modules/@lumigo/tracer/dist/tracer/tracer.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/opt/nodejs/node_modules/@lumigo/tracer/dist/tracer/tracer.js:4:12)"

Do I have to update my functions on old projects which I don’t use anymore?
Yes. You can either update the tracer or remove it if you are not using it anymore.

What will happen if I don’t update the tracer version?
A Node.js tracer version that has not been updated may cause your Lambda function to fail, disrupting both your AWS environment as well as your ability to use the Lumigo platform.