Skip to content

ref(producers): clean up issues TaskProducers#117686

Open
bmckerry wants to merge 1 commit into
masterfrom
ben/cleanup-issues-producers
Open

ref(producers): clean up issues TaskProducers#117686
bmckerry wants to merge 1 commit into
masterfrom
ben/cleanup-issues-producers

Conversation

@bmckerry

Copy link
Copy Markdown
Member

Followup to #117081, #117107, #117360

TaskProducer is fully rolled out to the above producers in all regions. This PR removes the options controlling rollout and cleans up producer instantiation so we only have 1 producer running in a process (either SingletonProducer or TaskProducer based on what process is running).

@bmckerry bmckerry requested review from a team as code owners June 15, 2026 15:34
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 15, 2026

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

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 33bdf82. Configure here.

else SingletonProducer(
_get_attribute_snapshot_producer,
max_futures=settings.SENTRY_GROUP_ATTRIBUTES_FUTURES_MAX_LIMIT,
)

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.

Import-time task producer selection

High Severity

_attribute_snapshot_producer is chosen once at import using settings.TASKWORKER_USE_TASK_PRODUCER. sentry.issues loads this module in AppConfig.ready() during configure(), before taskworker bootstrap sets that flag to True, so taskworker processes can keep a SingletonProducer for snapshot Kafka writes even when they should use TaskProducer.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 33bdf82. Configure here.

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.

This is valid, so I'll have to rethink how selecting the producer backend should work.
IMO ideally we'd just have a single producer we could use in both taskworker and non-taskworker processes.

Comment thread src/sentry/options/defaults.py
@bmckerry bmckerry force-pushed the ben/cleanup-issues-producers branch from 33bdf82 to 1551d10 Compare June 15, 2026 15:42
Comment thread src/sentry/monitors/tasks/clock_pulse.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants