Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Improve outcome logging #161

Merged
merged 3 commits into from
Aug 30, 2016
Merged

Conversation

pettermahlen
Copy link
Member

@pettermahlen pettermahlen commented Aug 29, 2016

The current, decorator-based, solution for logging request outcomes suffers from
decorators' ability to modify the actual response sent. An example of this is when
the AsyncContextOngoingRequest request processing gets short-circuited by a Jetty
timeout, but it can happen in other ways as well. To solve this, this PR makes request
logging a concern of the innermost OngoingRequest rather than a decorator concern.

The same is applicable to request statistics; a timeout today will not be correctly metered. That is intentionally left out of this PR, to be fixed in 2.0 only, instead.

Makes timeouts, drops and normal responses follow the same code
path, and ensures that we won't get IllegalStateExceptions from
AsyncContext in 'normal' operation.
@codecov-io
Copy link

codecov-io commented Aug 29, 2016

Current coverage is 69.59% (diff: 91.56%)

Merging #161 into 1.x will increase coverage by 0.29%

@@                1.x       #161   diff @@
==========================================
  Files           134        136     +2   
  Lines          2805       2845    +40   
  Methods           0          0          
  Messages          0          0          
  Branches        224        225     +1   
==========================================
+ Hits           1944       1980    +36   
- Misses          819        823     +4   
  Partials         42         42          

Powered by Codecov. Last update 5a0c052...a37b43d

@jo-ri
Copy link
Contributor

jo-ri commented Aug 30, 2016

+1 Nice!

@pettermahlen pettermahlen merged commit ff02bfe into spotify:1.x Aug 30, 2016
@pettermahlen pettermahlen deleted the fix-timeout-logging branch August 30, 2016 12:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants