Created
June 10, 2018 22:41
-
-
Save mdlavin/ff4f2feeebc9e8de64963bb610cf819c to your computer and use it in GitHub Desktop.
Node.js AWS X-Ray instrumentation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const xray = require('aws-xray-sdk-core'); | |
// Allow X-Ray to track execution through API API calls | |
xray.captureAWS(require('aws-sdk')); | |
// Allow X-Ray to track execution through external API calls | |
xray.captureHTTPsGlobal(require('http')); | |
// Allow X-Ray to track execution when Promises are used | |
xray.capturePromise(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment