Skip to content

feat(appsec): enable telemetry when appsec is enabled through the tracer and not the extension #641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ RUN rm -f ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_taint_tracki
RUN rm -f ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_stacktrace*.so
# _stack_v2 may not exist for some versions of ddtrace (e.g. under python 3.13)
RUN rm -f ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/stack_v2/_stack_v2.*.so
# remove *.dist-info directories except any entry_points.txt files
RUN find ./python/lib/$runtime/site-packages/*.dist-info -not -name "entry_points.txt" -type f -delete
# remove *.dist-info directories except any entry_points.txt files and METADATA files required for Appsec Software Composition Analysis
RUN find ./python/lib/$runtime/site-packages/*.dist-info \
-type f \
! \( -name 'entry_points.txt' -o -name 'METADATA' \) \
-delete
RUN find ./python/lib/$runtime/site-packages -type d -empty -delete

# Remove requests and dependencies
Expand Down
5 changes: 4 additions & 1 deletion datadog_lambda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@


if os.environ.get("DD_INSTRUMENTATION_TELEMETRY_ENABLED") is None:
os.environ["DD_INSTRUMENTATION_TELEMETRY_ENABLED"] = "false"
# Telemetry is required for Appsec Software Composition Analysis
os.environ["DD_INSTRUMENTATION_TELEMETRY_ENABLED"] = os.environ.get(
"DD_APPSEC_ENABLED", "false"
)

if os.environ.get("DD_API_SECURITY_ENABLED") is None:
os.environ["DD_API_SECURITY_ENABLED"] = "False"
Expand Down
Loading