Skip to content

feat(data-collection): add queues option to data collection config#6770

Merged
ericapisani merged 2 commits into
ep/db-spec-experiement-foundation-dictfrom
ep/py-2679-add-queues-option
Jul 8, 2026
Merged

feat(data-collection): add queues option to data collection config#6770
ericapisani merged 2 commits into
ep/db-spec-experiement-foundation-dictfrom
ep/py-2679-add-queues-option

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Add a queues boolean to the data collection spec, gated by send_default_pii like other PII-bearing fields.

Depends on getsentry/sentry-docs#18637 and the outcome of discussions there.

Fixes PY-2679
Fixes #6739


Stack created with GitHub Stacks CLIGive Feedback 💬

Add a `queues` boolean to the data collection spec, gated by
send_default_pii like other PII-bearing fields.

Depends on getsentry/sentry-docs#18637
and the outcome of discussions there.

Fixes PY-2679
Fixes #6739
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

90435 passed | ⏭️ 6302 skipped | Total: 96737 | Pass Rate: 93.49% | Execution Time: 313m 10s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +390
Passed Tests 📈 +390
Failed Tests
Skipped Tests

All tests are passing successfully.

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

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.74%    89.76%    +0.02%
==========================================
  Files          192       193        +1
  Lines        23823     23878       +55
  Branches      8226      8244       +18
==========================================
+ Hits         21378     21432       +54
- Misses        2445      2446        +1
- Partials      1349      1351        +2

Generated by Codecov Action

@ericapisani ericapisani marked this pull request as ready for review July 7, 2026 19:26
@ericapisani ericapisani requested a review from a team as a code owner July 7, 2026 19:26
"graphql": _graphql_from_value(d.get("graphql") or {}),
"gen_ai": _gen_ai_from_value(d.get("gen_ai") or {}),
"database": _database_from_value(d.get("database") or {}),
"queues": d.get("queues", True),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The new data_collection['queues'] setting is ignored by queue integrations. They continue to use should_send_default_pii(), potentially leaking data against the user's explicit configuration.
Severity: HIGH

Suggested Fix

Update the queue integrations (RQ, Huey, ARQ, Celery) to check the data_collection['queues'] setting from the client options. The logic should respect this new flag and not send queue arguments if it is set to False, regardless of the send_default_pii setting.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: sentry_sdk/data_collection.py#L161

Potential issue: The new `data_collection['queues']` configuration option is introduced
but not used by any of the queue integrations (RQ, Huey, ARQ, Celery). These
integrations continue to rely solely on `should_send_default_pii()` to decide whether to
capture job arguments and keyword arguments. This creates a situation where a user might
explicitly set `data_collection={'queues': False}` expecting to prevent sensitive data
from being sent, but the SDK will silently ignore this setting and leak the data if
`send_default_pii` is `True`. This is a functional data leakage vulnerability as the
feature does not work as documented.

Also affects:

  • sentry_sdk/integrations/celery/__init__.py:146
  • sentry_sdk/integrations/rq.py:188
  • sentry_sdk/integrations/huey.py:130
  • sentry_sdk/integrations/arq.py:177

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It hasn't be implemented yet, but it will be

@ericapisani ericapisani merged commit 88aea39 into master Jul 8, 2026
146 checks passed
@ericapisani ericapisani deleted the ep/py-2679-add-queues-option branch July 8, 2026 15:56
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.

Add support for the control of task arguments being filtered/sent in dataCollection

2 participants