Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle corner cases so that metrics are always updated #89

Merged
merged 1 commit into from
Feb 8, 2018

Conversation

nicmunroe
Copy link
Member

No description provided.

@nicmunroe
Copy link
Member Author

This handles two corner cases:

  1. The caller's connection drops (or the channel otherwise closes/dies) before any response has been sent.
  2. The caller's connection drops (or the channel otherwise closes/dies) after the response has started sending, but before it has completed sending.

Very similar, but different codepaths. In either case now metrics will be updated.

The other big fix was to proper decrement inflight requests and increment processed requests metrics when either of the two above situations occur. In particular this keeps the inflight requests counter from incorrectly growing over time when the corner cases happen.

@codecov-io
Copy link

codecov-io commented Feb 6, 2018

Codecov Report

Merging #89 into master will increase coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master      #89     +/-   ##
===========================================
+ Coverage     91.15%   91.26%   +0.1%     
- Complexity     2079     2084      +5     
===========================================
  Files           148      148             
  Lines          6029     6036      +7     
  Branches        790      790             
===========================================
+ Hits           5496     5509     +13     
+ Misses          357      355      -2     
+ Partials        176      172      -4
Impacted Files Coverage Δ Complexity Δ
...erver/handler/ChannelPipelineFinalizerHandler.java 100% <100%> (ø) 43 <6> (+1) ⬆️
...oste/metrics/codahale/CodahaleMetricsListener.java 100% <100%> (ø) 40 <0> (+1) ⬆️
...ient/asynchttp/netty/StreamingAsyncHttpClient.java 75.86% <0%> (+1.14%) 45% <0%> (+2%) ⬆️
...mpipeline/DownstreamIdleChannelTimeoutHandler.java 90% <0%> (+5%) 5% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13fb168...e935a70. Read the comment docs.

@nicmunroe nicmunroe merged commit 1b63e4e into Nike-Inc:master Feb 8, 2018
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.

2 participants