Skip to content

Commit b7d41a0

Browse files
committed
fix(appsec): enable appsec through the ddtrace product interface
1 parent 7bdc7d6 commit b7d41a0

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

datadog_lambda/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,9 @@
2727
# Patch third-party libraries for tracing, must be done before importing any
2828
# handler code.
2929
patch_all()
30+
31+
32+
from datadog_lambda.products import enable_ddtrace_products # noqa: E402
33+
34+
35+
enable_ddtrace_products()

datadog_lambda/products.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from datadog_lambda.config import config
2+
3+
4+
def enable_ddtrace_products():
5+
if config.appsec_enabled:
6+
from ddtrace.internal.appsec.product import start
7+
8+
start()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ classifiers = [
2828
python = ">=3.8.0,<4"
2929
datadog = ">=0.51.0,<1.0.0"
3030
wrapt = "^1.11.2"
31-
ddtrace = ">=3.11.0,<4"
31+
ddtrace = ">=3.12.0,<4"
3232
ujson = ">=5.9.0"
3333
botocore = { version = "^1.34.0", optional = true }
3434
requests = { version ="^2.22.0", optional = true }

0 commit comments

Comments
 (0)