1

I have a web application instrumented with Cloudwatch RUM which sends an x-amzn-trace-id header in all XHR requests. The AWS docs do not specify further instructions on how to connect client-side traces with backend services, so I assume there is automatic instrumentation. However, the Cloudwatch service map is unable to connect the full flow and it seems that lambda produces its own trace id. API Gateway v2 does not have any XRay tracing and I am unable to find a setting or cli command to enable it. Has anyone successfully done this with v2 of API Gateway?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470

2 Answers2

0

I reached out to AWS Support and got a link to the following documentation:

https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-vs-rest.html#:~:text=%E2%9C%93-,Monitoring,-API%20Gateway%20supports

It looks like v2 of API Gateway does not yet support xray tracing or execution logging at all.

FOLLOW UP:

Can I manually set the trace id in my lambda function using the sdk and the header sent from RUM?

0

Lambda service auto-generates a trace id before invoking a function when the trace header is not present in the invoke request headers. Manually overwriting this trace id within the function would likely result in broken trace between the Lambda and Lambda::Function nodes in the service graph.