Instrumenting your Application with AWS X-Ray

2021-05-06T11:11:54+00:00

Bookmarks Instrumenting your Node.js application Instrumenting your Java application Instrumenting your C# .Net application Instrumenting your Python application Instrumenting your Go application Instrumenting your Node.js application The AWS X-Ray SDK for Node.js provides middleware that you can use to instrument incoming HTTP requests. You need to add the SDK to your application’s dependencies, usually via package.json. Initialize the SDK client and add it to your application prior to declaring routes. var AWSXRay = require('aws-xray-sdk'); AWSXRay.setDaemonAddress('host:port'); app.use(AWSXRay.express.openSegment('MyApp'));       3. Lastly, use the SDK exceptions after declaring routes. app.get('/', function (req, res) [...]