Prevent AttributeError from being raised when lambda event is a list (#1738)

This commit is contained in:
Evan Pavlica
2023-04-04 11:53:21 -07:00
committed by GitHub
parent e4d42e6632
commit a7a4f71570
3 changed files with 17 additions and 1 deletions

View File

@ -399,6 +399,15 @@ class TestAwsLambdaInstrumentor(TestBase):
},
)
def test_lambda_handles_list_event(self):
AwsLambdaInstrumentor().instrument()
mock_execute_lambda([{"message": "test"}])
spans = self.memory_exporter.get_finished_spans()
assert spans
def test_uninstrument(self):
AwsLambdaInstrumentor().instrument()