Skip to content

Commit 3100913

Browse files
authored
feat(taskworker): Make ingest transactions taskworker compatible (#90319)
This work is required to migrate tasks from celery to the new taskbroker system. The sentry option will be used to control the rollout of these tasks. The full migration plan is describe in this [document](https://www.notion.so/sentry/Rollout-Planning-1bd8b10e4b5d80aeaaa7dba0efca83bc).
1 parent 9b9aa0b commit 3100913

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

src/sentry/options/defaults.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3377,6 +3377,11 @@
33773377
default={},
33783378
flags=FLAG_AUTOMATOR_MODIFIABLE,
33793379
)
3380+
register(
3381+
"taskworker.ingest.transactions.rollout",
3382+
default={},
3383+
flags=FLAG_AUTOMATOR_MODIFIABLE,
3384+
)
33803385
register(
33813386
"taskworker.telemetry-experience.rollout",
33823387
default={},

src/sentry/tasks/store.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from sentry.stacktraces.processing import process_stacktraces, should_process_for_stacktraces
2727
from sentry.tasks.base import instrumented_task
2828
from sentry.taskworker.config import TaskworkerConfig
29-
from sentry.taskworker.namespaces import issues_tasks
29+
from sentry.taskworker.namespaces import ingest_transactions_tasks, issues_tasks
3030
from sentry.utils import metrics
3131
from sentry.utils.event_tracker import TransactionStageStatus, track_sampled_event
3232
from sentry.utils.safe import safe_execute
@@ -657,6 +657,10 @@ def save_event(
657657
time_limit=65,
658658
soft_time_limit=60,
659659
silo_mode=SiloMode.REGION,
660+
taskworker_config=TaskworkerConfig(
661+
namespace=ingest_transactions_tasks,
662+
processing_deadline_duration=65,
663+
),
660664
)
661665
def save_event_transaction(
662666
cache_key: str | None = None,

src/sentry/taskworker/namespaces.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636

3737
ingest_profiling_tasks = taskregistry.create_namespace("ingest.profiling")
3838

39+
ingest_transactions_tasks = taskregistry.create_namespace("ingest.transactions")
40+
3941
issues_tasks = taskregistry.create_namespace("issues")
4042

4143
integrations_tasks = taskregistry.create_namespace("integrations")

0 commit comments

Comments
 (0)