Skip to content

Conversation

sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Jul 30, 2025

Promote enable_logs and before_send_log to regular (non-experimental) SDK options. Keep supporting the experimental versions too, for backwards compat.

Closes #4641

Copy link

codecov bot commented Jul 30, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.79%. Comparing base (c1861a3) to head (b6f746c).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sentry_sdk/utils.py 44.44% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4644      +/-   ##
==========================================
+ Coverage   80.75%   80.79%   +0.03%     
==========================================
  Files         156      156              
  Lines       16635    16643       +8     
  Branches     2831     2833       +2     
==========================================
+ Hits        13434    13446      +12     
+ Misses       2311     2306       -5     
- Partials      890      891       +1     
Files with missing lines Coverage Δ
sentry_sdk/client.py 78.76% <100.00%> (-0.05%) ⬇️
sentry_sdk/consts.py 94.73% <ø> (ø)
sentry_sdk/integrations/logging.py 83.97% <100.00%> (ø)
sentry_sdk/integrations/loguru.py 80.85% <100.00%> (+0.20%) ⬆️
sentry_sdk/utils.py 86.67% <44.44%> (-0.35%) ⬇️

... and 3 files with indirect coverage changes

Comment on lines +904 to +905
# type: (Optional[Log]) -> None
if not has_logs_enabled(self.options) or log is None:
Copy link
Contributor Author

@sentrivana sentrivana Jul 30, 2025

Choose a reason for hiding this comment

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

This is here because mypy was complaining about log not being Optional on line 962 (in the new diff) and the get_before_send_log function potentially returning None 🙄

@sentrivana sentrivana marked this pull request as ready for review July 30, 2025 10:20
@sentrivana sentrivana requested a review from a team as a code owner July 30, 2025 10:20
@sentrivana sentrivana merged commit 3425d4c into master Jul 31, 2025
137 of 138 checks passed
@sentrivana sentrivana deleted the ivana/logging-api branch July 31, 2025 12:20
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.

Remove experimental flag for logs options
2 participants