From 86fbd39a1659372cd862c7c41b4fae29d243753a Mon Sep 17 00:00:00 2001 From: Kian Jones <11655409+kianjones9@users.noreply.github.com> Date: Mon, 8 Dec 2025 12:22:29 -0800 Subject: [PATCH] feat: add dd instrumentation to web (#6531) * add dd instrumentation to web * instrument web fully * omit dd * add error handling for dd-trace initialization * use logger instead of console in dd-trace error handling * exception replay * fix dd-trace native module bundling and error serialization --- letta/server/rest_api/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/letta/server/rest_api/app.py b/letta/server/rest_api/app.py index dc9e1d1c..9fd753b3 100644 --- a/letta/server/rest_api/app.py +++ b/letta/server/rest_api/app.py @@ -241,6 +241,9 @@ def create_application() -> "FastAPI": os.environ.setdefault("DD_PROFILING_MEMORY_ENABLED", str(telemetry_settings.datadog_profiling_memory_enabled).lower()) os.environ.setdefault("DD_PROFILING_HEAP_ENABLED", str(telemetry_settings.datadog_profiling_heap_enabled).lower()) + # Note: DD_LOGS_INJECTION, DD_APPSEC_ENABLED, DD_IAST_ENABLED, DD_APPSEC_SCA_ENABLED + # are set via deployment configs and automatically picked up by ddtrace + if telemetry_settings.datadog_profiling_enabled: from ddtrace.profiling import Profiler