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

chore: Set up Sentry error catching #71

Merged
merged 15 commits into from
Dec 2, 2020
Merged

chore: Set up Sentry error catching #71

merged 15 commits into from
Dec 2, 2020

Conversation

frgfm
Copy link
Member

@frgfm frgfm commented Nov 29, 2020

This PR adds automatic error catching on all API calls, using Sentry SDK. This will be extremely useful to debug, since it provides the stack traces, the inputs, user information and everything you need to debug

Here is how it renders on Sentry after forcing a zero division error:
sentry_example

I already set the environment variables of the Sentry DNS on Heroku, so that we don't trigger this on our local dev versions!

Any feedback is welcome!

@frgfm frgfm added type: improvement New feature or request topic: build Related to build, installation & CI labels Nov 29, 2020
@frgfm frgfm added this to the 0.1.1 milestone Nov 29, 2020
@frgfm frgfm self-assigned this Nov 29, 2020
@codecov
Copy link

codecov bot commented Nov 29, 2020

Codecov Report

Merging #71 (4c89203) into master (129ff9d) will decrease coverage by 1.49%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
- Coverage   91.36%   89.87%   -1.50%     
==========================================
  Files          23       23              
  Lines         683      701      +18     
==========================================
+ Hits          624      630       +6     
- Misses         59       71      +12     
Flag Coverage Δ
unittests 89.87% <33.33%> (-1.50%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/app/main.py 61.11% <20.00%> (-15.82%) ⬇️
src/app/config.py 96.15% <100.00%> (+0.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 129ff9d...4c89203. Read the comment docs.

@frgfm frgfm temporarily deployed to pyronear-api November 29, 2020 14:07 Inactive
@frgfm frgfm temporarily deployed to pyronear-api November 29, 2020 14:10 Inactive
@frgfm frgfm temporarily deployed to pyronear-api November 29, 2020 14:31 Inactive
@frgfm frgfm temporarily deployed to pyronear-api November 29, 2020 14:41 Inactive
@frgfm frgfm temporarily deployed to pyronear-api November 29, 2020 14:53 Inactive
@frgfm frgfm temporarily deployed to pyronear-api November 29, 2020 14:58 Inactive
@frgfm frgfm merged commit 52dcda9 into master Dec 2, 2020
@frgfm frgfm deleted the sentry-setup branch December 2, 2020 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: build Related to build, installation & CI type: improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant