Skip to content

Commit 301963a

Browse files
chore(sentry apps): Manual disable for backstop (#103086)
1 parent 7eefa11 commit 301963a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/sentry/options/defaults.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3641,6 +3641,14 @@
36413641
flags=FLAG_AUTOMATOR_MODIFIABLE,
36423642
)
36433643

3644+
# Manual option for disabling misbehaving sentry apps from sending webhooks.
3645+
register(
3646+
"sentry-apps.webhook.restricted-webhook-sending",
3647+
type=Sequence,
3648+
default=[],
3649+
flags=FLAG_AUTOMATOR_MODIFIABLE,
3650+
)
3651+
36443652
# Killswitch for web vital issue detection
36453653
register(
36463654
"issue-detection.web-vitals-detection.enabled",

src/sentry/utils/sentry_apps/webhooks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ def send_and_save_webhook_request(
8080
with SentryAppInteractionEvent(
8181
operation_type=SentryAppInteractionType.SEND_WEBHOOK, event_type=event
8282
).capture() as lifecycle:
83+
if sentry_app.slug in options.get("sentry-apps.webhook.restricted-webhook-sending"):
84+
return Response()
85+
8386
buffer = SentryAppWebhookRequestsBuffer(sentry_app)
8487
org_id = app_platform_event.install.organization_id
8588
slug = sentry_app.slug_for_metrics

0 commit comments

Comments
 (0)