chore(pymongo): Remove transaction-based tracing - #7378
Conversation
Codecov Results 📊✅ 88842 passed | ⏭️ 4112 skipped | Total: 92954 | Pass Rate: 95.58% | Execution Time: 284m 1s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2268 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 90.24% 90.33% +0.09%
==========================================
Files 193 185 -8
Lines 25724 23450 -2274
Branches 9504 8594 -910
==========================================
+ Hits 23214 21182 -2032
- Misses 2510 2268 -242
- Partials 1435 1362 -73Generated by Codecov Action |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4a9646f. Configure here.
|
|
||
| span = sentry_sdk.traces.start_span( | ||
| name=query, attributes=span_first_data | ||
| data = { |
There was a problem hiding this comment.
Session IDs leak into query text
Medium Severity
Removing command.pop("lsid", None) leaves MongoDB session IDs in the serialized command. Those IDs now appear in span names, db.query.text, and breadcrumb messages. Modern PyMongo attaches lsid to almost every command, so identical queries get unique names and session identifiers are sent to Sentry.
Reviewed by Cursor Bugbot for commit 4a9646f. Configure here.


Closes https://linear.app/getsentry/issue/PY-2709/remove-transaction-based-tracing-from-pymongo