semantics
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
# #region TraceContextMiddlewareModule [C:3] [TYPE Module] [SEMANTICS fastapi, middleware, trace, context, request]
|
||||
# @BRIEF FastAPI/Starlette middleware that seeds a trace_id for every incoming HTTP request.
|
||||
# Optionally extracts X-Trace-ID header for cross-service trace propagation.
|
||||
# @LAYER: Core
|
||||
# @LAYER Core
|
||||
# @RELATION DEPENDS_ON -> [CotLoggerModule]
|
||||
# @RELATION CALLED_BY -> [AppModule]
|
||||
# @PRE: FastAPI app instance with Starlette middleware support.
|
||||
# @POST: Every request gets a trace_id via seed_trace_id(). Existing X-Trace-ID header is
|
||||
# @PRE FastAPI app instance with Starlette middleware support.
|
||||
# @POST Every request gets a trace_id via seed_trace_id(). Existing X-Trace-ID header is
|
||||
# preserved and used as the trace_id when present.
|
||||
# @SIDE_EFFECT: Sets ContextVar _trace_id for the duration of the request.
|
||||
# @SIDE_EFFECT Sets ContextVar _trace_id for the duration of the request.
|
||||
|
||||
from starlette.middleware.base import BaseHTTPMiddleware
|
||||
from starlette.requests import Request
|
||||
|
||||
Reference in New Issue
Block a user