newrelic/newrelic-lambda-extension

trace.id Log Property is Always Empty String

timothymathison opened this issue · 0 comments

Description

All of our lambda logs have the trace.id property set to any empty string instead of the actual trace ID.

Steps to Reproduce

Use the node newrelic lambda layer to lambda layer and ship logs to newrelic.

Expected Behavior

Logs should contain trace.id property that actually contains the ID of the corresponding trace.

Your Environment

Node v18
Lambda layer version: NewRelicNodeJS18X:48

Additional context

I noticed this comment in the code:

// There is a race condition here. Telemetry batch may be late, so the trace

I'm wondering if that's the source of the problem. Is there a workaround or way to fix this?