From 2ebf8d5fafe73f94885aa4a124ef681f74339de4 Mon Sep 17 00:00:00 2001 From: "getsantry[bot]" <66042841+getsantry[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 20:32:39 +0000 Subject: [PATCH] :hammer_and_wrench: apply pre-commit fixes --- src/sentry/utils/event_tracker.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sentry/utils/event_tracker.py b/src/sentry/utils/event_tracker.py index 96c892258980fa..205a747524b69b 100644 --- a/src/sentry/utils/event_tracker.py +++ b/src/sentry/utils/event_tracker.py @@ -1,6 +1,7 @@ +import logging from abc import ABC, abstractmethod from enum import Enum -import logging + class EventStageStatus(Enum): START = "start" @@ -26,10 +27,12 @@ class EventStageStatus(Enum): post_process_finished / the same as redis_deleted """ + class EventTrackerBackend(ABC): """ Abstract base class for event lineage tracking within a pipeline component. """ + @abstractmethod def record_processing_phase(self, event_id: str, status: EventStageStatus): """ @@ -41,10 +44,12 @@ def record_processing_phase(self, event_id: str, status: EventStageStatus): """ raise NotImplementedError + class EventTracker(EventTrackerBackend): """ Logger-based implementation of EventTrackerBackend. The data will be saved in BigQuery using Google Log Sink """ + def __init__(self): self.logger = logging.getLogger("EventTracker") logging.basicConfig(level=logging.INFO)