fix: close any existing active span when extracting the tracecontext by joeyzhao2018 · Pull Request #688 · DataDog/datadog-lambda-js

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I was thinking this should be logWarning because this is not expected.
But the customer is actively running into this issue and we simply cannot reproduce, warning logs will spam their logs right away.

Since we are still actively working with them. My proposal is that we keep it at DEBUG level for this release => then check with the customer to understand which span was that leaked span => have a good reproduction case and fix it => update this to WARNING level.