DataDog / datadog-lambda-rb

The Datadog AWS Lambda Layer for Ruby
Apache License 2.0
8 stars 8 forks source link

Update listener.rb #51

Closed amancevice closed 3 years ago

amancevice commented 3 years ago

What does this PR do?

Add :to_s to extraction of Function ARN in case this value is nil

Motivation

When invoking the function with SAM, context.invoked_function_arn can be nil which causes the existing code to error

Testing Guidelines

I tested this by manually creating a mock context object where context.invoked_function_arn == "" and saw that it worked

Additional Notes

Types of changes

Check all that apply

DylanLovesCoffee commented 3 years ago

Thanks for the contribution @amancevice! It seems like the integration tests are failing for a reason unrelated to the PR, so once we get them to pass I'll merge this for you.