Skip to content

Commit d68a079

Browse files
chore(instrumentation-aws-lambda): test missing module
1 parent 018f955 commit d68a079

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

plugins/node/opentelemetry-instrumentation-aws-lambda/test/integrations/lambda-handler.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,19 @@ describe('lambda handler', () => {
842842
});
843843
});
844844

845+
describe('non-existent handler module', () => {
846+
it('should skip instrumentation', async () => {
847+
initializeHandler('lambda-test/callback.handle');
848+
849+
const handler = await lambdaLoadHandler('lambda-test/async.handler');
850+
const result = await handler('arg', ctx);
851+
852+
assert.strictEqual(result, 'ok');
853+
const spans = memoryExporter.getFinishedSpans();
854+
assert.strictEqual(spans.length, 0);
855+
});
856+
});
857+
845858
describe('non-existent handler function', () => {
846859
it('should skip instrumentation', async () => {
847860
initializeHandler('lambda-test/async.handle');

0 commit comments

Comments
 (0)