Sitelet https://github.com/getsentry/sentry-python/pull/7250
Skip to content

fix(dramatiq): Gate request body collection on data_collection experiment - #7250

Open
ericapisani wants to merge 2 commits into
py-2419-request-body-aiohttpfrom
py-2419-request-body-dramatiq
Open

fix(dramatiq): Gate request body collection on data_collection experiment#7250
ericapisani wants to merge 2 commits into
py-2419-request-body-aiohttpfrom
py-2419-request-body-dramatiq

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Only attach dramatiq message data to the event when the data_collection experiment's http_bodies config includes "incoming_request", matching the behavior in other integrations (e.g. aiohttp). The "dramatiq" context type is still always set.

Refs PY-2419
Refs #6283

…ment

Only attach dramatiq message data to the event when the data_collection
experiment's http_bodies config includes "incoming_request", matching
the behavior in other integrations (e.g. aiohttp). The "dramatiq" context
type is still always set.

Refs PY-2419
Refs #6283
@ericapisani
ericapisani requested a review from a team as a code owner August 25, 2026 19:22
@linear-code

linear-code Bot commented Aug 25, 2026

Copy link
Copy Markdown

PY-2419

@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.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 278b786. Configure here.

Comment thread sentry_sdk/integrations/dramatiq.py
Comment thread tests/integrations/dramatiq/test_dramatiq.py
@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

117748 passed | ⏭️ 6732 skipped | Total: 124480 | Pass Rate: 94.59% | Execution Time: 416m 48s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +79
Passed Tests 📈 +81
Failed Tests 📉 -2
Skipped Tests

➖ 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 88.89%. Project has 2486 uncovered lines.
✅ Project coverage is 90.23%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/dramatiq.py 88.89% ⚠️ 1 Missing and 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.22%    90.23%    +0.01%
==========================================
  Files          193       193         —
  Lines        25435     25443        +8
  Branches      9346      9354        +8
==========================================
+ Hits         22947     22957       +10
- Misses        2488      2486        -2
- Partials      1434      1433        -1

Generated by Codecov Action

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.

1 participant