Skip to content

Commit

Permalink
Merge pull request #20 from coralogix/chore/CDS-682
Browse files Browse the repository at this point in the history
fix accessing headers of empty event CDS-682
  • Loading branch information
NimrodAvni78 authored Oct 3, 2023
2 parents 42604f4 + 1c44ca5 commit 96412ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nodejs/packages/layer/src/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const lambdaAutoInstrumentConfig: AwsLambdaInstrumentationConfig = {
disableAwsContextPropagation: true,
eventContextExtractor: (event, context) => {
// try to extract propagation from http headers first
const httpHeaders = event.headers || {};
const httpHeaders = event?.headers || {};
const extractedHttpContext: OtelContext = propagation.extract(
otelContext.active(),
httpHeaders,
Expand Down

0 comments on commit 96412ce

Please sign in to comment.