Skip to content

Commit f26589f

Browse files
author
Stephen Cefali
authored
adds more vsts webhook logging for debugging (#18470)
1 parent e817470 commit f26589f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/sentry/integrations/vsts/webhooks.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,23 @@ def check_webhook_secret(self, request, integration):
7575
try:
7676
integration_secret = integration.metadata["subscription"]["secret"]
7777
webhook_payload_secret = request.META["HTTP_SHARED_SECRET"]
78+
logger.info(
79+
"vsts.simple-webhook-check",
80+
extra={
81+
"equality1": integration_secret == webhook_payload_secret,
82+
"equality2": constant_time_compare(integration_secret, webhook_payload_secret),
83+
},
84+
)
85+
# TODO(Steve): remove
86+
# I don't want to put the webhook secret in logs except for my own integration I don't care about :)
87+
if integration.id == 58554:
88+
logger.info(
89+
"vst.special-webhook-sercret",
90+
extra={
91+
"integration_secret": six.text_type(integration_secret),
92+
"webhook_payload_secret": six.text_type(webhook_payload_secret),
93+
},
94+
)
7895
except KeyError as e:
7996
logger.info(
8097
"vsts.missing-webhook-secret",

0 commit comments

Comments
 (0)