aws/aws-xray-sdk-node

AWS Lambda : Not able to capture outgoing HTTP/HTTPS calls

vj-12 opened this issue · 4 comments

vj-12 commented

not seeing any information for outgoing http calls. Followed the documentations to instrument http calls. Using native https module only.

Lambda Node Version : 14.x
aws-sdk : 2.939.0
aws-xray-sdk : 3.3.3

image
image

Hi @vj-12,

Have you enabled active tracing on your Lambda function? And does the function have sufficient permissions to send data to X-Ray? That is to say, are you seeing any info on your X-Ray service map?

If the above is true and you are seeing some trace data but not the downstream HTTP request, then please post the logs from your Lambda function so we can see if there's any errors.

vj-12 commented

I have enabled tracing & my lambda's execution roles have permissions to put traces. I can see the other services invocations in the map like dynamodb & other lambda invokes. But, Somehow it is not capturing https downstream calls.

IAM Policy Statements
image

Service Maps, There must be one more node for remote call ?
xray

logs for the function having outgoing http call
image

@vj-12 a couple of ideas:

  1. Make sure you also .capturePromise()
  2. If it is a http protocol, and not https you also need to .captureHTTPs(require('http'))

I've just opened an issue containing some example code that runs inside a lambda: #465

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in next 7 days. Thank you for your contributions.