You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Node agent automatically parses incoming HTTP headers to continue a distributed trace. In a recent test with API Gateway V2 in Lambda, the incoming trace header was not extracted from the request, and a new trace ID was generated.
This process is invoked in the wrapped handler with shim.tracer.getTransaction() (here), which leverages the transaction tracer's getTransaction method. The agent iterates over headers in the api-gateway.js file, which iterates over headers, looking for headers defined in the event-sources.json file.
Expected Behavior
The Node agent's method of detecting the incoming trace header should work seamlessly with either V2 or V1 API Gateway event payloads.
Steps to Reproduce
We'll be supplied with the test functions that were used to detect this, and we'll deploy them in the dev account. If deploying with the Serverless framework, we can specify a V2 gateway by including an event definition like this:
events:
- httpApi:
method: GET
path: /
By comparison, the equivalent V1 gateway is defined with
Description
The Node agent automatically parses incoming HTTP headers to continue a distributed trace. In a recent test with API Gateway V2 in Lambda, the incoming trace header was not extracted from the request, and a new trace ID was generated.
This process is invoked in the wrapped handler with
shim.tracer.getTransaction()
(here), which leverages the transaction tracer'sgetTransaction
method. The agent iterates over headers in the api-gateway.js file, which iterates over headers, looking for headers defined in the event-sources.json file.Expected Behavior
The Node agent's method of detecting the incoming trace header should work seamlessly with either V2 or V1 API Gateway event payloads.
Steps to Reproduce
We'll be supplied with the test functions that were used to detect this, and we'll deploy them in the dev account. If deploying with the Serverless framework, we can specify a V2 gateway by including an event definition like this:
By comparison, the equivalent V1 gateway is defined with
Additional context
https://new-relic.atlassian.net/browse/NR-265371
The text was updated successfully, but these errors were encountered: