Improve request logging and make health check lightweight
- Log slow requests (>1s) at WARNING level with slow=true flag - Log request timeouts at WARNING level in TimeoutMiddleware - Replace heavy GetStatsContext with lightweight Ping in health check - Add Ping method to database interface (SELECT 1)
This commit is contained in:
@@ -420,6 +420,11 @@ func (m *mockStore) Checkpoint(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Ping mock implementation
|
||||
func (m *mockStore) Ping(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestRouteWatchLiveFeed(t *testing.T) {
|
||||
|
||||
// Create mock database
|
||||
|
||||
Reference in New Issue
Block a user