Last active
January 7, 2021 03:53
-
-
Save trmaphi/a45fa521868f0d57eea29712f359d3e0 to your computer and use it in GitHub Desktop.
Setup X-ray on Lambda
This file contains hidden or 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
/// Setup tracing in a separate file | |
import * as AWSXRay from 'aws-xray-sdk-core'; | |
// Configure the context missing strategy to do nothing | |
// https://docs.aws.amazon.com/lambda/latest/dg/nodejs-tracing.html | |
AWSXRay.setContextMissingStrategy(() => { }); | |
// https://github.com/aws/aws-xray-sdk-node/issues/143 | |
AWSXRay.captureAWS(require('aws-sdk')); | |
/// Import tracing configuration on top of Lambda Handler | |
import './tracing'; | |
// Your handler dependencies and implementation down here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment