Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- Produce Span V2 Kafka messages. ([#5151](https://github.com/getsentry/relay/pull/5151), [#5173](https://github.com/getsentry/relay/pull/5173), [#5199](https://github.com/getsentry/relay/pull/5199))
- Extract additional `user.geo.*` attributes on spans. ([#5194](https://github.com/getsentry/relay/pull/5194))
- Modernize session processing and move to Relay's new processing framework. ([#5201](https://github.com/getsentry/relay/pull/5201))
- Add TraceMetric data category. ([#5206](https://github.com/getsentry/relay/pull/5206))

## 25.9.0

Expand Down
1 change: 1 addition & 0 deletions py/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Add InstallableBuild and SizeAnalysis data categories. ([#5084](https://github.com/getsentry/relay/pull/5084))
- Add `retentions` to the project configuration. ([#5135](https://github.com/getsentry/relay/pull/5135))
- Normalization: Trim event tag keys & values to 200 chars instead of dropping them. ([#5198](https://github.com/getsentry/relay/pull/5198))
- Add TraceMetric data category. ([#5206](https://github.com/getsentry/relay/pull/5206))

## 0.9.16

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 @@ -43,6 +43,7 @@ class DataCategory(IntEnum):
PREVENT_REVIEW = 30
SIZE_ANALYSIS = 31
INSTALLABLE_BUILD = 32
TRACE_METRIC = 33
UNKNOWN = -1
# end generated

Expand Down
14 changes: 9 additions & 5 deletions relay-base-schema/src/data_category.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ pub enum DataCategory {
/// artifacts are downloaded for installation.
/// When enabled there will typically be one 'InstallableBuild' per uploaded artifact.
InstallableBuild = 32,
/// TraceMetric
///
/// This is the data category to count the number of trace metric items.
TraceMetric = 33,
//
// 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 @@ -195,6 +199,7 @@ impl DataCategory {
"prevent_review" => Self::PreventReview,
"size_analysis" => Self::SizeAnalysis,
"installable_build" => Self::InstallableBuild,
"trace_metric" => Self::TraceMetric,
_ => Self::Unknown,
}
}
Expand Down Expand Up @@ -236,6 +241,7 @@ impl DataCategory {
Self::PreventReview => "prevent_review",
Self::SizeAnalysis => "size_analysis",
Self::InstallableBuild => "installable_build",
Self::TraceMetric => "trace_metric",
Self::Unknown => "unknown",
}
}
Expand Down Expand Up @@ -338,6 +344,7 @@ impl TryFrom<u8> for DataCategory {
30 => Ok(Self::PreventReview),
31 => Ok(Self::SizeAnalysis),
32 => Ok(Self::InstallableBuild),
33 => Ok(Self::TraceMetric),
other => Err(UnknownDataCategory(other)),
}
}
Expand All @@ -352,10 +359,7 @@ mod tests {
// If this test fails, update the numeric bounds so that the first assertion
// maps to the last variant in the enum and the second assertion produces an error
// that the DataCategory does not exist.
assert_eq!(
DataCategory::try_from(32),
Ok(DataCategory::InstallableBuild)
);
assert_eq!(DataCategory::try_from(33), Err(UnknownDataCategory(33)));
assert_eq!(DataCategory::try_from(33), Ok(DataCategory::TraceMetric));
assert_eq!(DataCategory::try_from(34), Err(UnknownDataCategory(34)));
}
}
6 changes: 6 additions & 0 deletions relay-cabi/include/relay.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ enum RelayDataCategory {
* When enabled there will typically be one 'InstallableBuild' per uploaded artifact.
*/
RELAY_DATA_CATEGORY_INSTALLABLE_BUILD = 32,
/**
* TraceMetric
*
* This is the data category to count the number of trace metric items.
*/
RELAY_DATA_CATEGORY_TRACE_METRIC = 33,
/**
* Any other data category not known by this Relay.
*/
Expand Down
3 changes: 2 additions & 1 deletion relay-quotas/src/quota.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ impl CategoryUnit {
| DataCategory::PreventReview
| DataCategory::Session
| DataCategory::SizeAnalysis
| DataCategory::InstallableBuild => Some(Self::Count),
| DataCategory::InstallableBuild
| DataCategory::TraceMetric => Some(Self::Count),
DataCategory::Attachment | DataCategory::LogByte => Some(Self::Bytes),
DataCategory::ProfileDuration | DataCategory::ProfileDurationUi => {
Some(Self::Milliseconds)
Expand Down
Loading