feat(logs): Enrich logs with context-aware primtive types (#5949)

* enrich logs with context-aware primtive types

* Delete apps/core/docs/LOG_CONTEXT.md
This commit is contained in:
Kian Jones
2025-11-05 16:46:24 -08:00
committed by Caren Thomas
parent e2774c07c6
commit ea3248593c
7 changed files with 389 additions and 4 deletions

View File

@@ -62,7 +62,7 @@ from letta.server.db import db_registry
# NOTE(charles): these are extra routes that are not part of v1 but we still need to mount to pass tests
from letta.server.rest_api.auth.index import setup_auth_router # TODO: probably remove right?
from letta.server.rest_api.interface import StreamingServerInterface
from letta.server.rest_api.middleware import CheckPasswordMiddleware, ProfilerContextMiddleware
from letta.server.rest_api.middleware import CheckPasswordMiddleware, LogContextMiddleware, ProfilerContextMiddleware
from letta.server.rest_api.routers.v1 import ROUTERS as v1_routes
from letta.server.rest_api.routers.v1.organizations import router as organizations_router
from letta.server.rest_api.routers.v1.users import router as users_router # TODO: decide on admin
@@ -519,6 +519,8 @@ def create_application() -> "FastAPI":
if telemetry_settings.profiler:
app.add_middleware(ProfilerContextMiddleware)
app.add_middleware(LogContextMiddleware)
app.add_middleware(
CORSMiddleware,
allow_origins=settings.cors_origins,