getsentry / getsentry/sentry

Alert rules fail to consider the case where there was no traffic last week/day/point in time

Open
#47,104 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
1d 5h
Merged PRs (30d)
624

Description

### Problem Statement

Our traffic is a bit spiky.

I wanted to set up an Alert Rule to monitor a transaction, with an interval period of 24 hours. I wanted it to alert me if the latency goes above 300% of the value it was last week.

I tried doing so, but the issue is if the point in time last week had no traffic for that transaction at all (which often happens for us, as our traffic is spiky), Sentry treats that transaction as having a latency of 0ms. Which is kind of weird, and makes us gets alert for spurious reasons (we get an alert whenever the transaction last week had no traffic, because in comparison to 0ms, any latency is too high).

### Solution Brainstorm

As a workaround, we are manually setting calculating the latency for last week and setting it as a static threshold, but as you can imagine, this is not sustainable. latency alerting thresholds

Support confirmed the case of no traffic was not considered, but I believe the correct solution would be for on traffic to be elegantly handled. Perhaps by letting us specific a default value in that case, or just using the last known value.

> Currently, our alerts do not account for the case where the transaction had no traffic in the previous week. . . . if you feel that having a default baseline value (or some other threshold) for transactions with no traffic in the previous week would be a useful feature, please submit this feature request.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.