Skip to content

ref: Move Redis breadcrumbs to integration - #7129

Merged
sentrivana merged 15 commits into
masterfrom
ivana/move-redis-breadcrumbs-to-integration
Aug 7, 2026
Merged

ref: Move Redis breadcrumbs to integration#7129
sentrivana merged 15 commits into
masterfrom
ivana/move-redis-breadcrumbs-to-integration

Conversation

@sentrivana

Copy link
Copy Markdown
Contributor

Description

Decouple Redis breadcrumbs from span data.

Issues

Closes #7065

Move subprocess breadcrumb creation from the centralized
`maybe_create_breadcrumbs_from_span` hook into the stdlib integration's
`Popen.__init__` wrapper. This makes breadcrumbs work for both legacy
spans and streamed spans, and removes the dependency on span internals.
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

99265 passed | ⏭️ 6479 skipped | Total: 105744 | Pass Rate: 93.87% | Execution Time: 357m 31s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

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

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.98%    89.99%    +0.01%
==========================================
  Files          193       193         —
  Lines        24975     24991       +16
  Branches      9008      9012        +4
==========================================
+ Hits         22474     22490       +16
- Misses        2501      2501         —
- Partials      1437      1437         —

Generated by Codecov Action

@sentrivana
sentrivana marked this pull request as ready for review August 7, 2026 08:03
@sentrivana
sentrivana requested a review from a team as a code owner August 7, 2026 08:03
Comment thread sentry_sdk/integrations/redis/_sync_common.py Outdated
@sentrivana
sentrivana marked this pull request as draft August 7, 2026 08:11
@sentrivana
sentrivana marked this pull request as ready for review August 7, 2026 08:16
@sentrivana
sentrivana marked this pull request as draft August 7, 2026 08:31
@sentrivana
sentrivana marked this pull request as ready for review August 7, 2026 09:10

@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 7472af9. Configure here.

type="redis",
category="redis",
data=breadcrumb_data,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Breadcrumb callbacks can block Redis operations

Medium Severity

The new add_breadcrumb calls run outside capture_internal_exceptions. If before_breadcrumb raises, the exception escapes the wrapper before the underlying Redis command executes, turning telemetry callback failures into application failures.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7472af9. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a good point. Will take care of it in #7133

Base automatically changed from ivana/move-breadcrumbs-to-integrations to master August 7, 2026 09:18

@alexander-alderman-webb alexander-alderman-webb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Redis looks good to me

Comment on lines 308 to 313

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These changes are already on master, might need to update the branch

@sentrivana
sentrivana enabled auto-merge (squash) August 7, 2026 11:20
@sentrivana
sentrivana merged commit c21dd48 into master Aug 7, 2026
140 checks passed
@sentrivana
sentrivana deleted the ivana/move-redis-breadcrumbs-to-integration branch August 7, 2026 11: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.

Set breadcrumbs for Redis in the streaming trace lifecycle

2 participants