Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: add user id to tracing (#1990)
cthomasbbebd958d2ef
diff --git a/letta/tracing.py b/letta/tracing.pyindex 7ec712fc2..b4304a6c6 100644--- a/letta/tracing.py+++ b/letta/tracing.py@@ -75,6 +75,11 @@ async def update_trace_attributes(request: Request):for key, value in request.path_params.items():span.set_attribute(f"http.{key}", value)+ # Add user ID if available+ user_id = request.headers.get("user_id")+ if user_id:+ span.set_attribute("user.id", user_id)+# Add request body if availabletry:body = await request.json()