Skip to content

Commit

Permalink
feat: set x-correlation-id from apigateway context.requestId
Browse files Browse the repository at this point in the history
  • Loading branch information
mvayngrib committed Nov 27, 2017
1 parent 12c7b74 commit 7b96bef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/env.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ export default class Env {
this.set(props)

const requestCtx = {
'correlation-id': context.awsRequestId,
'request-id': context.awsRequestId,
'correlation-id': source === 'http' ? event.requestContext.requestId : context.awsRequestId,
'container-id': this.containerId
}

Expand Down

0 comments on commit 7b96bef

Please sign in to comment.