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

Improve metrics reporting #672

Merged
merged 2 commits into from
Sep 7, 2018

Conversation

gavronek
Copy link
Contributor

@gavronek gavronek commented Sep 6, 2018

Fixes #665 .

Changes proposed in this pull request:

  • In case of an HttpException use the status code from the exception to report in the metrics

@@ -30,16 +32,19 @@ def __call__(self, function):

@functools.wraps(function)
def wrapper(request):
status_code = 500
status = 'unknown-exception'
Copy link
Collaborator

Choose a reason for hiding this comment

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

FWIW I can imagine this being a big pain for someone trying parse logs who expects the status to always be an integer.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I'd still default this to 500, what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I also expect it to be 500, since that's what makes sense from an end-2-end visibility point of view.

@jmcs
Copy link
Contributor

jmcs commented Sep 7, 2018

👍

@jmcs jmcs merged commit 806bba1 into spec-first:master Sep 7, 2018
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.

3 participants