mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-08-02 19:47:17 +08:00
Prevent AttributeError from being raised when lambda event is a list (#1738)
This commit is contained in:
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user