Guest User

Untitled

a guest
May 24th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. import AWSXRay from 'aws-xray-sdk-core'
  2.  
  3. export async function myLambdaFunction (event) {
  4. return await captureAsyncFunc('myLambdaFunction',
  5. () => handleEvent(event)
  6. )
  7. }
  8.  
  9. export async function handleEvent (event) {
  10. const segment = AWSXRay.getSegment()
  11. segment.addAnnotation('function', 'myLambdaFunction')
  12. segment.addMetadata('event', event)
  13. }
Add Comment
Please, Sign In to add comment