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

Add a way to mark http requests as failed or not(passed) #1856

Merged
merged 2 commits into from
Mar 2, 2021

Commits on Mar 2, 2021

  1. Configuration menu
    Copy the full SHA
    7e81f66 View commit details
    Browse the repository at this point in the history
  2. Add a way to mark http requests as failed

    This is done through running a callback on every request before emitting
    the metrics. Currently only a built-in metric looking at good statuses
    is possible, but a possibility for future JS based callbacks is left
    open.
    
    The implementation specifically makes it hard to figure out anything
    about the returned callback from JS and tries not to change any other
    code so it makes it easier for future implementation, but instead tries
    to do the bare minimum without imposing any limitations on the future
    work.
    
    Additionally because it turned out to be easy, setting the callback to
    null will make the http library to neither tag requests with `expected_response`
    nor emit the new `http_req_failed` metric, essentially giving users a way to
    go back to the previous behaviour.
    
    part of #1828
    mstoykov committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    d86e24a View commit details
    Browse the repository at this point in the history