Skip to content

Commit

Permalink
Revert "ref(proguard): Remove separate queue (#74198)"
Browse files Browse the repository at this point in the history
This reverts commit 1b13e98.

Co-authored-by: loewenheim <7622248+loewenheim@users.noreply.github.com>
  • Loading branch information
getsentry-bot and loewenheim committed Jul 15, 2024
1 parent 1b13e98 commit a1ab12d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ def SOCIAL_AUTH_DEFAULT_USERNAME() -> str:
Queue("email.inbound", routing_key="email.inbound"),
Queue("events.preprocess_event", routing_key="events.preprocess_event"),
Queue("events.process_event", routing_key="events.process_event"),
Queue("events.process_event_proguard", routing_key="events.process_event_proguard"),
Queue(
"events.reprocessing.preprocess_event", routing_key="events.reprocessing.preprocess_event"
),
Expand Down
9 changes: 9 additions & 0 deletions src/sentry/options/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,15 @@
flags=FLAG_PRIORITIZE_DISK | FLAG_AUTOMATOR_MODIFIABLE,
)

# The fraction of prooguard events that will be routed to the
# separate `store.process_event_proguard` queue
# TODO: Unused, remove this.
register(
"store.separate-proguard-queue-rate",
default=0.0,
flags=FLAG_AUTOMATOR_MODIFIABLE | FLAG_MODIFIABLE_RATE,
)

# Query and supply Bundle Indexes to Symbolicator SourceMap processing
register(
"symbolicator.sourcemaps-bundle-index-sample-rate", default=0.0, flags=FLAG_AUTOMATOR_MODIFIABLE
Expand Down
36 changes: 36 additions & 0 deletions src/sentry/tasks/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,42 @@ def process_event(
)


# TODO: Unused, remove this.
@instrumented_task(
name="sentry.tasks.store.process_event_proguard",
queue="events.process_event_proguard",
time_limit=65,
soft_time_limit=60,
silo_mode=SiloMode.REGION,
)
def process_event_proguard(
cache_key: str,
start_time: float | None = None,
event_id: str | None = None,
data_has_changed: bool = False,
from_symbolicate: bool = False,
has_attachments: bool = False,
**kwargs: Any,
) -> None:
"""
Handles event processing (for those events that need it)
:param string cache_key: the cache key for the event data
:param int start_time: the timestamp when the event was ingested
:param string event_id: the event identifier
:param boolean data_has_changed: set to True if the event data was changed in previous tasks
"""
return do_process_event(
cache_key=cache_key,
start_time=start_time,
event_id=event_id,
from_reprocessing=False,
data_has_changed=data_has_changed,
from_symbolicate=from_symbolicate,
has_attachments=has_attachments,
)


@instrumented_task(
name="sentry.tasks.store.process_event_from_reprocessing",
queue="events.reprocessing.process_event",
Expand Down

0 comments on commit a1ab12d

Please sign in to comment.