DataDog / serverless-plugin-datadog

Serverless plugin to automagically instrument your Lambda functions with Datadog
Apache License 2.0
96 stars 49 forks source link

fix: Modify ASM logic to honor addExtension as well as enableASM config #481

Closed astuyve closed 8 months ago

astuyve commented 8 months ago

What does this PR do?

The enableASM functionality had two faulty logic components:

  1. It never checked the value of enableASM, only the presence. So enableASM: false would still attempt to enable ASM.
  2. It never checked the presence of the Datadog Extension. The Extension provides the binary used by AWS_LAMBDA_WRAPPER and without it, the function crashes.

Motivation

Fixes #480

Testing Guidelines

Additional Notes

Types of changes

Check all that apply

codecov-commenter commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.33%. Comparing base (5b4bc42) to head (a2f7805).

:exclamation: Current head a2f7805 differs from pull request most recent head 9cd4a32. Consider uploading reports for the commit 9cd4a32 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #481 +/- ## ======================================= Coverage 76.33% 76.33% ======================================= Files 12 12 Lines 955 955 Branches 299 299 ======================================= Hits 729 729 Misses 164 164 Partials 62 62 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Fodoj commented 7 months ago

Does it also fix https://github.com/DataDog/serverless-plugin-datadog/issues/477 ?