File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed
model-engine/model_engine_server Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ class CustomMiddleware(BaseHTTPMiddleware):
47
47
async def dispatch (self , request : Request , call_next ):
48
48
try :
49
49
LoggerTagManager .set (LoggerTagKey .REQUEST_ID , str (uuid .uuid4 ()))
50
+ LoggerTagManager .set (LoggerTagKey .REQUEST_SIZE , request .headers .get ("content-length" ))
50
51
# we intentionally exclude healthcheck routes from the concurrency limiter
51
52
if request .url .path in healthcheck_routes :
52
53
return await call_next (request )
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ class LoggerTagKey(str, Enum):
42
42
REQUEST_ID = "request_id"
43
43
TEAM_ID = "team_id"
44
44
USER_ID = "user_id"
45
+ REQUEST_SIZE = "request_size"
45
46
46
47
47
48
class LoggerTagManager :
You can’t perform that action at this time.
0 commit comments