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

Cleanup top level request exception logging #4669

Merged
merged 2 commits into from Feb 18, 2019

Conversation

Projects
None yet
3 participants
@erikjohnston
Copy link
Member

erikjohnston commented Feb 18, 2019

Firstly, we always logged that the request was being handled via
JsonResource._async_render, so we change that to use the servlet name
we add to the request.

Secondly, we pass the exception information to the logger rather than
formatting it manually. This makes it consistent with other exception
logging, allwoing logging hooks and formatters to access the exception
information.

erikjohnston added some commits Feb 18, 2019

Cleanup top level request exception logging
Firstly, we always logged that the request was being handled via
`JsonResource._async_render`, so we change that to use the servlet name
we add to the request.

Secondly, we pass the exception information to the logger rather than
formatting it manually. This makes it consistent with other exception
logging, allwoing logging hooks and formatters to access the exception
information.
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Feb 18, 2019

Codecov Report

Merging #4669 into develop will decrease coverage by <.01%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #4669      +/-   ##
===========================================
- Coverage    75.27%   75.26%   -0.01%     
===========================================
  Files          338      338              
  Lines        34626    34626              
  Branches      5670     5670              
===========================================
- Hits         26064    26061       -3     
- Misses        6966     6969       +3     
  Partials      1596     1596

@erikjohnston erikjohnston requested a review from matrix-org/synapse-core Feb 18, 2019

@richvdh
Copy link
Member

richvdh left a comment

I'm not entirely convinced by fishing request_metrics out of the request object, but lgtm

@erikjohnston

This comment has been minimized.

Copy link
Member Author

erikjohnston commented Feb 18, 2019

Me neither, but thought of refactoring all of this when its just there didn't appeal right now.

@erikjohnston erikjohnston merged commit 028267a into develop Feb 18, 2019

7 checks passed

ci/circleci: sytestpy2merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy2postgresmerged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3postgresmerged Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing d1b060b...12ae64c
Details
codecov/project 75.26% (target 0%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@erikjohnston erikjohnston deleted the erikj/log_exception branch Mar 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.