We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32a4672 commit 8aa2f41Copy full SHA for 8aa2f41
packages/instrumentation-aws-lambda/src/instrumentation.ts
@@ -77,12 +77,15 @@ const headerGetter: TextMapGetter<APIGatewayProxyEventHeaders> = {
77
},
78
};
79
80
-const sqsContextGetter = {
81
- keys(carrier: any): string[] {
82
- return Object.keys(carrier || {});
+const sqsContextGetter: TextMapGetter = {
+ keys(carrier): string[] {
+ if (carrier == null) {
83
+ return [];
84
+ }
85
+ return Object.keys(carrier);
86
- get(carrier: any, key: string) {
- return carrier?.[key]?.stringValue;
87
+ get(carrier, key: string) {
88
+ return carrier?.[key]?.stringValue || carrier?.[key]?.value;
89
90
91
0 commit comments