Skip to content

Commit 82888a3

Browse files
ref(crons): Log monitor clock tick over metric counter (#54484)
Instead of using a metric counter, we can just log each time we trigger the clock tick. This allows us to easily verify that it's monotonically incrementing as we would expect
1 parent f581c47 commit 82888a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sentry/monitors/consumers/monitor_consumer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ def _try_handle_high_volume_task_trigger(ts: datetime):
194194
# close, but in the case of a backlog, this will be much higher
195195
total_delay = reference_ts - datetime.now().timestamp()
196196

197-
metrics.incr("monitors.task.triggered_via_high_volume_clock", sample_rate=1.0)
198-
metrics.gauge("monitors.task.high_volume_clock_delay", total_delay)
197+
logger.info(f"Monitor consumer clock tick: {reference_datetime}")
198+
metrics.gauge("monitors.task.high_volume_clock_delay", total_delay, sample_rate=1.0)
199199

200200
# If more than exactly a minute has passed then we've skipped a
201201
# task run, report that to sentry, it is a problem.

0 commit comments

Comments
 (0)