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 status code to request duration metric #1755

Merged

Conversation

m3co-code
Copy link
Contributor

Its best practice to monitor request durations partitioned by the status code of the response. 4xx/5xx usually have a different response time then succeeding requests. In case of 4xx they are most of the time very fast and depending on the type of server error, 5xx are also either very fast or very slow. Having no differentiation of those would distort calculations on the request durations, e.g. when you want to calculate an average.

Adding the label to the metric is not breaking existing Prometheus queries and is therefore backwards compatible.

Copy link
Contributor

@timoreimann timoreimann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

:shipit:

@ldez ldez force-pushed the add-status-code-to-req-duration-metric branch from 6219e7f to 0ad822c Compare June 26, 2017 15:59
@ldez ldez merged commit 0055965 into traefik:master Jun 26, 2017
@ldez ldez added this to the 1.4 milestone Jun 27, 2017
@ldez ldez changed the title add status code to request duration metric Add status code to request duration metric Aug 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants