aws/aws-xray-sdk-node

API Gateway x-ray traces, unable to filter based on response fields

chandermani opened this issue · 5 comments

We are using AWS Xray node sdk version 3.3.3. For the x-ray that are generated when we try to analyze the x-ray traces all relevant fields come as blank.
X-ray
xray-1

Traces
xray-2

xray-3

This includes

  • url
  • http status code
  • agent
  • http method
    and few others.

Can someone let us know what can use this issue.

Hi @chandermani,

Thank you for raising this with us. Can you please post the raw JSON of a trace that contains that service you're filtering by in the X-Ray analytics console? Also, how are you creating the segments for this service?

Hi @willarmiros,
Sorry for the delayed response. I lost track of this issue.

I am attaching a JSON trace for an API gateway call
Here is a sample xray trace.

We are using out of the box x-ray node sdk and configuring it in our lambdas once

      AWSXRay.captureHTTPsGlobal(http, true)
      AWSXRay.captureHTTPsGlobal(https, true)
      AWSXRay.capturePromise()      

For API Gateway it has been configured with x-ray tracing at info level

Hi @willarmiros,
Did you have any suggestions for us.

Thanks,
Chandermani

Hi @chandermani - not sure why this data is not showing up in your console. In your sample trace the http fields are completely filled out with the required data. It may be possible you need to click on "show in charts" to display these because they are not part of one of the filtered groups.

Please see the documentation for the analytics console to learn more: https://docs.aws.amazon.com/xray/latest/devguide/xray-console-analytics.html

If this doesn't work, could you confirm the sample trace you showed is one of the 170 traces matched by your query?

Thanks for your response @willarmiros. I will look at it. I spend a little more time to identify the issue and it seem this is happening when the API Gateway is private and invoked through vpc endpoint. If I make the same gateway regional I start to see correct parameters logged. I will investigate further.