Skip to content

Commit

Permalink
Merge branch 'main' into fix_keys_method
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthccv authored Dec 19, 2022
2 parents d8f31db + a9f3413 commit bf01666
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,18 @@ def test_api_gateway_http_api_proxy_event_sets_attributes(self):
SpanAttributes.HTTP_USER_AGENT: "agent",
},
)

def test_uninstrument(self):
AwsLambdaInstrumentor().instrument()

mock_execute_lambda(MOCK_LAMBDA_API_GATEWAY_HTTP_API_EVENT)

spans = self.memory_exporter.get_finished_spans()
self.assertEqual(len(spans), 1)

self.memory_exporter.clear()
AwsLambdaInstrumentor().uninstrument()

mock_execute_lambda(MOCK_LAMBDA_API_GATEWAY_HTTP_API_EVENT)
spans = self.memory_exporter.get_finished_spans()
self.assertEqual(len(spans), 0)

0 comments on commit bf01666

Please sign in to comment.