Skip to content

feat(logging): Make Logs the primary feature - #7248

Merged
sentrivana merged 15 commits into
major/3.0from
ivana/major/logging-integration-changes
Aug 27, 2026
Merged

feat(logging): Make Logs the primary feature#7248
sentrivana merged 15 commits into
major/3.0from
ivana/major/logging-integration-changes

Conversation

@sentrivana

@sentrivana sentrivana commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Description

Get the logging integration into shape now that Sentry Logs is a first-class feature. The idea is to make Logs the primary feature the integration offers, with capturing events an optional add-on.

High-level overview of the changes:

  • The integration has to be enabled explicitly by the user. It's not auto-enabled anymore.
  • Sentry logs related options and features get more generic sounding names.
    • For instance, level (before: sentry_logs_level), ignore_logger (before: ignore_logger_for_sentry_logs) now set the Sentry logs level and Sentry logs denylist, respectively.
    • Existing secondary features with previously generic names get specialized names (level -> breadcrumb_level, ignore_logger -> ignore_logger_for_events).
  • Capturing Sentry logs is on by default when the integration is enabled.
  • Event capture is off by default, but can be turned on via an option. Breadcrumb capture is still on by default.
  • The capture_sentry_logs option is gone completely. Since logs instrumentation is now on by default, and the level option exists, it was superfluous. Capturing logs can still be opted out of by setting level=None.

Collateral:

  • Updated unrelated tests that were implicitly relying on default behavior of the logging integration

Issues

Closes #7246
Closes https://linear.app/getsentry/issue/PY-2739/update-logging-integration

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

110268 passed | ⏭️ 5428 skipped | Total: 115696 | Pass Rate: 95.31% | Execution Time: 381m 5s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -8705
Passed Tests 📉 -7399
Failed Tests 📉 -2
Skipped Tests 📉 -1304

➖ Removed Tests (2)

View removed tests
  • test_continuous_profiler_auto_start_and_stop_sampled[non-experiment-gevent]
    • File: tests.profiler.test_continuous_profiler
  • test_continuous_profiler_auto_start_and_stop_sampled_span_streaming[experiment-gevent]
    • File: tests.profiler.test_continuous_profiler

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2267 uncovered lines.
✅ Project coverage is 90.52%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/logging.py 100.00% ⚠️ 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.22%    90.52%     +0.3%
==========================================
  Files          193       185        -8
  Lines        25435     23906     -1529
  Branches      9346      8806      -540
==========================================
+ Hits         22947     21639     -1308
- Misses        2488      2267      -221
- Partials      1434      1376       -58

Generated by Codecov Action

@sentrivana
sentrivana marked this pull request as ready for review August 26, 2026 09:29
@sentrivana
sentrivana requested a review from a team as a code owner August 26, 2026 09:29

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e79e158. Configure here.

Comment thread tests/integrations/logging/test_logging.py Outdated
@sentrivana sentrivana changed the title chore(logging): Clean up LoggingIntegration chore(logging): Make Logs the primary feature Aug 26, 2026
@linear-code

linear-code Bot commented Aug 26, 2026

Copy link
Copy Markdown

PY-2739

@sentrivana sentrivana changed the title chore(logging): Make Logs the primary feature feat(logging): Make Logs the primary feature Aug 26, 2026
@sentrivana
sentrivana merged commit 8b50a3c into major/3.0 Aug 27, 2026
129 checks passed
@sentrivana
sentrivana deleted the ivana/major/logging-integration-changes branch August 27, 2026 07:33
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.

2 participants