Skip to content

Commit aa60fae

Browse files
committed
test: Test für Instrumentierungsfehler
1 parent 41d0d4b commit aa60fae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,16 @@ export class AwsLambdaInstrumentation extends InstrumentationBase<AwsLambdaInstr
157157
if (isWrapped(moduleExports[functionName])) {
158158
this._unwrap(moduleExports, functionName);
159159
}
160+
// try {
160161
this._wrap(
161162
moduleExports,
162163
functionName,
163164
this._getHandler(lambdaStartTime)
164165
);
166+
// } catch (error) {
167+
// // _wrap is not error safe. We do not want the instrumented lambda to fail if wrapping fails.
168+
// diag.error('patching handler function failed', error);
169+
// }
165170
return moduleExports;
166171
},
167172
(moduleExports?: LambdaModule) => {

0 commit comments

Comments
 (0)