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

prometheus: make sure http_requests_error_total and http_requests_total are incremented. #1953

Merged
merged 4 commits into from
Oct 20, 2022

Conversation

o0Ignition0o
Copy link
Contributor

@o0Ignition0o o0Ignition0o commented Oct 13, 2022

fixes #1954

prometheus: make sure http_requests_error_total and http_requests_total are incremented. (PR #1953)

http_requests_error_total did only increment for requests that would be an INTERNAL_SERVER_ERROR in the router (the service stack returning a BoxError).
What this means is that validation errors would not increment this counter.

http_requests_total would only increment for successful requests, while the prometheus documentation mentions this key should be incremented regardless of whether the request succeeded or not.

This PR makes sure we always increment http_requests_total, and we increment http_requests_error_total when the StatusCode is not 2XX.

@github-actions

This comment has been minimized.

@o0Ignition0o o0Ignition0o changed the title prometheus: report errors that occured before execution prometheus: make sure http_requests_error_total and http_requests_total are incremented. Oct 13, 2022
@o0Ignition0o
Copy link
Contributor Author

Manually requesting reviews from @BrynCooke and @bnjjj because They probably have the most context, and I'm not sure what their intent was when this was built.

@o0Ignition0o o0Ignition0o marked this pull request as ready for review October 13, 2022 19:10
@o0Ignition0o o0Ignition0o enabled auto-merge (squash) October 20, 2022 10:07
@o0Ignition0o o0Ignition0o merged commit b33fe0a into dev Oct 20, 2022
@o0Ignition0o o0Ignition0o deleted the igni/validation_request_errors branch October 20, 2022 10:24
@abernix abernix mentioned this pull request Oct 25, 2022
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.

Errors does not reflect to error metrics.
3 participants