Skip to content

Commit bf01666

Browse files
authored
Merge branch 'main' into fix_keys_method
2 parents d8f31db + a9f3413 commit bf01666

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

instrumentation/opentelemetry-instrumentation-aws-lambda/tests/test_aws_lambda_instrumentation_manual.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,3 +379,18 @@ def test_api_gateway_http_api_proxy_event_sets_attributes(self):
379379
SpanAttributes.HTTP_USER_AGENT: "agent",
380380
},
381381
)
382+
383+
def test_uninstrument(self):
384+
AwsLambdaInstrumentor().instrument()
385+
386+
mock_execute_lambda(MOCK_LAMBDA_API_GATEWAY_HTTP_API_EVENT)
387+
388+
spans = self.memory_exporter.get_finished_spans()
389+
self.assertEqual(len(spans), 1)
390+
391+
self.memory_exporter.clear()
392+
AwsLambdaInstrumentor().uninstrument()
393+
394+
mock_execute_lambda(MOCK_LAMBDA_API_GATEWAY_HTTP_API_EVENT)
395+
spans = self.memory_exporter.get_finished_spans()
396+
self.assertEqual(len(spans), 0)

0 commit comments

Comments
 (0)