Skip to content

Conversation

@antonpirker
Copy link
Contributor

Loguru has two message levels TRACE and SUCCESS that are not available in Sentry breadcrumbs. This PR maps TRACE to debug and SUCCESS to info in Sentry so those breadcrumbs do not show a confusing error message in the Sentry UI.

Fixes #2759

@antonpirker antonpirker requested a review from sentrivana March 18, 2025 10:34
@codecov
Copy link

codecov bot commented Mar 18, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 79.50%. Comparing base (bc54a1d) to head (4601407).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sentry_sdk/integrations/loguru.py 66.66% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4147      +/-   ##
==========================================
- Coverage   79.57%   79.50%   -0.08%     
==========================================
  Files         141      141              
  Lines       15714    15723       +9     
  Branches     2671     2673       +2     
==========================================
- Hits        12505    12501       -4     
- Misses       2367     2377      +10     
- Partials      842      845       +3     
Files with missing lines Coverage Δ
sentry_sdk/integrations/loguru.py 88.13% <66.66%> (-1.87%) ⬇️

... and 7 files with indirect coverage changes

Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

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

Looks ok, but the tests need fixing.

@antonpirker antonpirker merged commit 11abdd2 into master Mar 19, 2025
139 of 140 checks passed
@antonpirker antonpirker deleted the antonpirker/fix/loguru-levels branch March 19, 2025 07:48
@andyshinn
Copy link

Thanks for eventually getting to this! I know it's small but I always appreciate when I don't need to see weird warnings staring back at me in the UI.

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.

Sentry doesn't support loguru level=trace

4 participants