Skip to content

Commit

Permalink
feat(billing): Uptime DataCategory (#4363)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrettscott authored Dec 11, 2024
1 parent d4b0730 commit 21aad1e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

**Internal**:

- Adds the UPTIME DataCategory ([#4363](https://github.com/getsentry/relay/pull/4363))
- Promote some `span.data` fields to the top level. ([#4298](https://github.com/getsentry/relay/pull/4298))
- Remove metrics summaries. ([#4278](https://github.com/getsentry/relay/pull/4278), [#4279](https://github.com/getsentry/relay/pull/4279), [#4296](https://github.com/getsentry/relay/pull/4296))
- Use async `redis` for `projectconfig`. ([#4284](https://github.com/getsentry/relay/pull/4284))
Expand Down
1 change: 1 addition & 0 deletions py/sentry_relay/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class DataCategory(IntEnum):
PROFILE_CHUNK = 18
METRIC_SECOND = 19
REPLAY_VIDEO = 20
UPTIME = 21
UNKNOWN = -1
# end generated

Expand Down
4 changes: 4 additions & 0 deletions relay-base-schema/src/data_category.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ pub enum DataCategory {
///
/// This is the data category for Session Replays produced via a video recording.
ReplayVideo = 20,
/// This is the data category for Uptime monitors.
Uptime = 21,
//
// IMPORTANT: After adding a new entry to DataCategory, go to the `relay-cabi` subfolder and run
// `make header` to regenerate the C-binding. This allows using the data category from Python.
Expand Down Expand Up @@ -125,6 +127,7 @@ impl DataCategory {
"profile_chunk" => Self::ProfileChunk,
"metric_second" => Self::MetricSecond,
"replay_video" => Self::ReplayVideo,
"uptime" => Self::Uptime,
_ => Self::Unknown,
}
}
Expand Down Expand Up @@ -154,6 +157,7 @@ impl DataCategory {
Self::ProfileChunk => "profile_chunk",
Self::MetricSecond => "metric_second",
Self::ReplayVideo => "replay_video",
Self::Uptime => "uptime",
Self::Unknown => "unknown",
}
}
Expand Down
5 changes: 5 additions & 0 deletions relay-cabi/include/relay.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ enum RelayDataCategory {
* This is the data category for Session Replays produced via a video recording.
*/
RELAY_DATA_CATEGORY_REPLAY_VIDEO = 20,
/**
* Uptime Monitor
*
*/
RELAY_DATA_CATEGORY_UPTIME = 21,
/**
* Any other data category not known by this Relay.
*/
Expand Down
1 change: 1 addition & 0 deletions relay-quotas/src/quota.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ impl CategoryUnit {
| DataCategory::MetricBucket
| DataCategory::UserReportV2
| DataCategory::ProfileChunk
| DataCategory::Uptime
| DataCategory::MetricSecond => Some(Self::Count),
DataCategory::Attachment => Some(Self::Bytes),
DataCategory::Session => Some(Self::Batched),
Expand Down

0 comments on commit 21aad1e

Please sign in to comment.