Skip to content

Add middleware to log API request processing time#66

Open
vanshjohri09-collab wants to merge 1 commit intosugarlabs:mainfrom
vanshjohri09-collab:add-request-time-logging
Open

Add middleware to log API request processing time#66
vanshjohri09-collab wants to merge 1 commit intosugarlabs:mainfrom
vanshjohri09-collab:add-request-time-logging

Conversation

@vanshjohri09-collab
Copy link

@vanshjohri09-collab vanshjohri09-collab commented Mar 11, 2026

Description

This PR adds a FastAPI middleware that logs the time taken to process each API request.

The middleware records the HTTP method, request path, and processing duration for every request. This information can help identify slow endpoints and assist with performance monitoring and debugging.

Adding request timing logs improves observability of the API and makes it easier to analyze performance issues during development and deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant