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

Better logging of exceptions #7465

Merged
merged 4 commits into from May 12, 2019

Conversation

Projects
4 participants
@anton-vlasenko
Copy link
Contributor

commented Apr 23, 2019

Q A
Bug fix?
New feature? Y
Automated tests included?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?
Deprecations?

Description:

When curl throws an exception mautic logs it as-is. Without attaching details. The exception report without specific information is useless:

Operation timed out after 15001 milliseconds with 0 bytes received
Could not resolve host: examplehost.com

There is no information about where are these comming from. Is it about webhooks? URL shortener? Email send? What was the url we were trying to contact? Etc.
We need to catch the exception, decorate it with all the available metadata and throw it again. Ideally with a stacktrace too.

Steps to reproduce the bug:

  1. Go to logs and search for logs like "Operation timed out after".
  2. Such logs contain no information about where the error has happened.

Steps to test this PR:

  1. It's difficult to test this PR, because we need to get the same errors like the ones in the description and check if they contain stacktrace. But the issue is that we don't know why and where are they happening, because we are unable to get stactkrace from the logs.
@Woeler

This comment has been minimized.

Copy link
Member

commented Apr 24, 2019

Hey, thanks for the contribution. Could you check the CS fixer logs in travis?

@anton-vlasenko

This comment has been minimized.

Copy link
Contributor Author

commented Apr 24, 2019

@Woeler Hi!
I've fixed travis errors, but now it says there are Scrunitizer errors.
I can't find any details about the errors, it only says that the analysis has failed.
Maybe you know where to look?
https://scrutinizer-ci.com/g/mautic/mautic/inspections/b73d490b-7930-441e-a0f3-0cadbb69aff7
Thank you in advance.

@Woeler

This comment has been minimized.

Copy link
Member

commented Apr 24, 2019

Ah yea, Scrutinizer does some weird stuff sometimes. We can ignore that. All good :)

@npracht npracht added this to the 2.15.2 milestone Apr 25, 2019

@npracht npracht added this to Ready to Test (first time) in Mautic 2 Apr 25, 2019

@kuzmany kuzmany merged commit be61bd2 into mautic:staging May 12, 2019

1 of 2 checks passed

Scrutinizer Analysis: Errored – Tests: passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

Mautic 2 automation moved this from Ready to Test (first time) to Merged May 12, 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.