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

metrics: Record request metrics on HTTP errors #5979

Merged
merged 3 commits into from
Dec 15, 2023

Commits on Dec 15, 2023

  1. Record request metrics on HTTP errors

    If the error returned by the wrapped handler is a `Caddy.HandlerError`,
    that indicates a problem that still yielded a successful HTTP
    transaction, so it makes sense to observe request duration and size
    metrics for it.
    
    See mholt/caddy-ratelimit#35 for some context.
    tgeoghegan authored and francislavoie committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    655ad1b View commit details
    Browse the repository at this point in the history
  2. Review feedback

    - use `errors.As`
    - add test verifying that expected time series appear in the scrape
    tgeoghegan authored and francislavoie committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    e860711 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fbdd348 View commit details
    Browse the repository at this point in the history