fix(appsec): enable SpanProcessor through the ddtrace product interface by florentinl · Pull Request #647 · DataDog/datadog-lambda-python
What does this PR do?
This PR enables the AppSec Product when DD_APPSEC_ENABLED is set.
Motivation
With DataDog/dd-trace-py@7bfeeb0 (to be released in 3.12), Appsec has moved from being enabled by default by the tracer to being enabled through a Product.
Outside of lambda (when started with ddtrace-run or import ddtrace.auto) products are automatically gathered by a ProductManager and started based on the configuration.
This step does not happen in lambda and individual products that we want to make available to lambda need to be started manually. This is what I am doing for Appsec.
Testing Guidelines
Manually. I don't see how I could test this in unit tests. Suggestions welcome.
It will eventually be caught by system-tests once this PR is ready: DataDog/system-tests#4891
Additional Notes
Types of Changes
- Bug fix
- New feature
- Breaking change
- Misc (docs, refactoring, dependency upgrade, etc.)
Check all that apply
- This PR's description is comprehensive
- This PR contains breaking changes that are documented in the description
- This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
- This PR impacts documentation, and it has been updated (or a ticket has been logged)
- This PR's changes are covered by the automated tests
- This PR collects user input/sensitive content into Datadog
- This PR passes the integration tests (ask a Datadog member to run the tests)