Skip to content

Commit 6604cf2

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

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
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()

0 commit comments

Comments
 (0)