Skip to content

Commit

Permalink
remove unnecessary logs (committing wip state)
Browse files Browse the repository at this point in the history
  • Loading branch information
mifu67 committed Dec 11, 2024
1 parent fe7c546 commit e3c7915
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
9 changes: 1 addition & 8 deletions src/sentry/incidents/subscription_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,17 +373,10 @@ def process_update(self, subscription_update: QuerySubscriptionUpdate) -> None:
results = []
for data_packet, detectors in detectors:
results.append(process_detectors(data_packet, detectors))
# NOTE: this is temporary, to verify in the tests that the right information is flowing through the pipeline.
logger_results = []
for result_list in results:
logger_result_list = []
for detector, result in result_list:
logger_result_list.append((detector.id, result))
logger_results.append(logger_result_list)
logger.info(
"Results from process_detectors",
extra={
"results": logger_results,
"results": results,
},
)
self.last_update = subscription_update["timestamp"]
Expand Down
25 changes: 0 additions & 25 deletions tests/sentry/incidents/test_subscription_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@
from sentry.testutils.helpers.features import with_feature
from sentry.types.group import PriorityLevel
from sentry.utils import json
from sentry.workflow_engine.handlers.detector.base import DetectorEvaluationResult
from sentry.workflow_engine.types import DetectorPriorityLevel

EMPTY = object()

Expand Down Expand Up @@ -2966,29 +2964,6 @@ def test_process_data_sources(self, mock_logger):
data_source = self.create_data_source(query_id=rule.snuba_query.id, type="incidents")
data_source.detectors.set([detector])
self.send_update(rule, 10)
mock_logger.info.assert_called_with(
"Results from process_detectors",
extra={
"results": (
[
[
(
1,
{
"dummy_group": DetectorEvaluationResult(
group_key="dummy_group",
is_active=True,
priority=DetectorPriorityLevel.HIGH,
result=None,
event_data=None,
)
},
)
]
]
)
},
)


class MetricsCrashRateAlertProcessUpdateTest(ProcessUpdateBaseClass, BaseMetricsTestCase):
Expand Down

0 comments on commit e3c7915

Please sign in to comment.