1

In my code, I'm using aws-xray-sdk at the moment and I want to migrate to @aws-sdk/client-xray, XRay Client - AWS SDK for JavaScript v3. I have the following piece of code and my question is what would be a replacement for it using the new xray client? Apart from XRay, I use S3, SES, and SQS.

  import * as https from 'https';
  import AWSXRay from 'aws-xray-sdk';
  import AWS from 'aws-sdk';

  AWSXRay.captureHTTPsGlobal(https, false);
  AWSXRay.captureAWS(AWS);
Mehdi Javan
  • 1,081
  • 6
  • 25

1 Answers1

0

AWS SDK for JavaScript v3 and AWS XRay SDK for node they are 2 different packages. Migrating AWS SDK for JavaScript from v2 to v3 means user has to modify their application code by following https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html

If user is using AWS XRay SDK for node instrument AWS SDK for JavaScript v3 in his application, please follow instruction https://github.com/aws/aws-xray-sdk-node/tree/master/packages/core#capture-outgoing-aws-requests-on-a-single-client

Lei Wang
  • 217
  • 1
  • 4