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

promhttp: count hard request failures in roundtripper metrics #943

Commits on Dec 2, 2021

  1. promhttp: count hard request failures in roundtripper metrics

    Right now InstrumentRoundTripper{Counter,Duration} don't increase any
    metrics in case of hard request failures (e.g., TCP, TLS failures). This
    makes these functions unattractive to use, as those failures are
    typically among the most interesting ones to alert on.
    
    This change extends these functions to count such requests properly. To
    distinguish them from requests that did yield an actual response, we
    leave the "code" label empty. This seems the correct thing to do,
    because hard request failures don't yield a code from the remote side.
    
    Signed-off-by: Ed Schouten <eschouten@apple.com>
    EdSchouten committed Dec 2, 2021
    Copy the full SHA
    ca86423 View commit details
    Browse the repository at this point in the history