From f0314392d2142b05a72fca6527f475b71dee6ec7 Mon Sep 17 00:00:00 2001 From: mdtro <20070360+mdtro@users.noreply.github.com> Date: Wed, 24 Jul 2024 14:45:14 -0500 Subject: [PATCH] fix: add additional details in log and capture message --- src/sentry/integrations/github_enterprise/webhook.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sentry/integrations/github_enterprise/webhook.py b/src/sentry/integrations/github_enterprise/webhook.py index d90b113a6e820d..93302e5aa99672 100644 --- a/src/sentry/integrations/github_enterprise/webhook.py +++ b/src/sentry/integrations/github_enterprise/webhook.py @@ -282,7 +282,12 @@ def handle(self, request: HttpRequest) -> HttpResponse: else: # the host is allowed to skip signature verification # log it, and continue on. + extra["github_enterprise_version"] = request.headers.get( + "x-github-enterprise-version" + ) + extra["ip_address"] = request.headers.get("x-real-ip") logger.info("github_enterprise.webhook.allowed-missing-signature", extra=extra) + sentry_sdk.capture_message("Allowed missing signature") except (MalformedSignatureError, IndexError) as e: logger.warning("github_enterprise.webhook.malformed-signature", extra=extra)