getsentry / getsentry/sentry

Quota alert based on a specific product

Open
#113,368 3 comments 1 reaction 0 assignees View on GitHub
2. High Feature Product Area: Alerts Waiting for: Product Owner
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
21h 10m
Merged PRs (30d)
635

Description

### Problem Statement

I'd like to create/enable an alert that fires when I've reached some percentage threshold of my monthly quota for a particular type of product. For example, if my quota is 5M errors in a month (regardless of quota for spans, logs, replays, etc.), I'd like to be able to set an alert at 50% and get an alert at the point where I've used 2.5M errors in a billing cycle.

I can see that I can change the modify the threshold(s) for alerts that apply to "all reserved volumes in your subscription" from `Subscription->Spend Notifications->Manage Spend Notifications->Subscription Consumption`, but my understanding is that that applies to all products, not just a specific one.

### Solution Brainstorm

I played around trying to configure a custom "number of errors" alert that would effectively do the same thing, but I couldn't quite get it to do what I wanted it to. Seems like those alerts mostly want to compare a chunk of time to a similar (previous) chunk of time, but I'd like to just check the running total in my current billing period.

I think I'll probably implement some sort of stopgap by writing a script that can query the stats endpoint and setting up a cron to do that locally, but it'd be nice if I could configure that type of thing within the Sentry console.

### Product Area

Alerts

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Sentry console path under Subscription → Spend Notifications → Manage Spend Notifications → Subscription Consumption, then trace how quota usage is exposed by the stats endpoint. Define how a threshold for one product should be measured within the current billing cycle; done means a configurable alert fires at the requested percentage without including other products.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.