Skip to content

Instantly share code, notes, and snippets.

@nealeu
Created July 9, 2019 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nealeu/82dfa67670274eb06a46ccea72a5b116 to your computer and use it in GitHub Desktop.
Save nealeu/82dfa67670274eb06a46ccea72a5b116 to your computer and use it in GitHub Desktop.
let dynamoDb = new AWS.DynamoDB.DocumentClient(dynamoParams);
if (process.env.XRAY_DYNAMO) {
const AWSXRay = require("aws-xray-sdk-core");
if (process.env.IS_OFFLINE) {
AWSXRay.setLogger(console);
}
AWS = AWSXRay.captureAWS(AWS);
dynamoDb = AWSXRay.captureAWSClient(dynamoDb);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment