[kimi] Refactor request_logging.py::dispatch (#616) #765
Reference in New Issue
Block a user
Delete Branch "kimi/issue-616"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #616
Summary
Broke up the 79-line
dispatchmethod inRequestLoggingMiddlewareinto focused helper methods.Changes
dispatch()reduced from 79 lines to 27 lines_should_skip_path()- checks if path should be skipped from logging_prepare_request_context()- generates correlation ID and records start time_get_duration_ms()- calculates request duration in milliseconds_log_success()- logs successful requests via_log_request()_log_error()- logs failed requests with error capture/escalationVerification