Browse Source

Revert "debug(crons): Log error for mismatched projects (#61803)"

This reverts commit 8d1fb58c0a5c880aa99ac38a76a76c0f8d943be0.

Co-authored-by: asottile-sentry <103459774+asottile-sentry@users.noreply.github.com>
getsentry-bot 1 year ago
parent
commit
dd90c60be5

+ 0 - 13
src/sentry/monitors/consumers/monitor_consumer.py

@@ -97,19 +97,6 @@ def _ensure_monitor_with_config(
         )
         if created:
             signal_monitor_created(project, None, True)
-        # TODO(rjo100): Temporarily log to measure impact of a bug incorrectly scoping
-        # the Monitor lookups to the wrapper's project_id. This means that any consumer check-in
-        # will automatically get attached to a monitor with the given slug, regardless
-        # of the monitor's attached project.
-        if monitor.project_id != project.id:
-            logger.error(
-                "Monitor project + wrapper project do not match",
-                extra={
-                    "organization.id": project.organization_id,
-                    "monitor.project_id": monitor.project_id,
-                    "project.id": project.id,
-                },
-            )
 
     # Update existing monitor
     if monitor and not created and monitor.config != validated_config:

+ 0 - 17
src/sentry/monitors/endpoints/monitor_ingest_checkin_index.py

@@ -1,6 +1,5 @@
 from __future__ import annotations
 
-import logging
 from datetime import timedelta
 
 from django.db import router, transaction
@@ -40,8 +39,6 @@ from sentry.utils import metrics
 
 from .base import MonitorIngestEndpoint
 
-logger = logging.getLogger(__name__)
-
 CHECKIN_QUOTA_LIMIT = 5
 CHECKIN_QUOTA_WINDOW = 60
 
@@ -169,20 +166,6 @@ class MonitorIngestCheckInIndexEndpoint(MonitorIngestEndpoint):
 
                     if created:
                         signal_monitor_created(project, request.user, True)
-                    # TODO(rjo100): Temporarily log to measure impact of a bug incorrectly scoping
-                    # the Monitor lookups to the DSN's project_id. This means that any DSN check-in
-                    # will automatically get attached to a monitor with the given slug, regardless
-                    # of the monitor's attached project.
-                    if monitor.project_id != project.id:
-                        logger.error(
-                            "Monitor project + DSN project do not match",
-                            extra={
-                                "organization.id": project.organization_id,
-                                "monitor.project_id": monitor.project_id,
-                                "project.id": project.id,
-                            },
-                        )
-
             except MonitorLimitsExceeded as e:
                 return self.respond({type(e).__name__: str(e)}, status=400)