diff --git a/CHANGELOG.md b/CHANGELOG.md index 63d1833b05..b7651e0c06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Only extract span metrics / tags when they are needed. ([#2907](https://github.com/getsentry/relay/pull/2907), [#2923](https://github.com/getsentry/relay/pull/2923), [#2924](https://github.com/getsentry/relay/pull/2924)) - Normalize metric resource identifiers in `event._metrics_summary` and `span._metrics_summary`. ([#2914](https://github.com/getsentry/relay/pull/2914)) - Validate error_id and trace_id vectors in replay deserializer. ([#2931](https://github.com/getsentry/relay/pull/2931)) +- Add a data category for indexed spans. ([#2937](https://github.com/getsentry/relay/pull/2937)) ## 23.12.1 diff --git a/py/CHANGELOG.md b/py/CHANGELOG.md index 2859bce5fe..efeb62b629 100644 --- a/py/CHANGELOG.md +++ b/py/CHANGELOG.md @@ -5,6 +5,7 @@ - This release requires Python 3.9 or later. There are no intentionally breaking changes included in this release, but we stopped testing against Python 3.8. - Normalize event timestamps before validating them, fixing cases where Relay would drop valid events with reason "invalid_transaction". ([#2878](https://github.com/getsentry/relay/pull/2878)) - Normalize error and trace-ids. Values must be valid UUIDs. ([#2931](https://github.com/getsentry/relay/pull/2931)) +- Add a data category for indexed spans. ([#2937](https://github.com/getsentry/relay/pull/2937)) ## 0.8.39 diff --git a/py/sentry_relay/consts.py b/py/sentry_relay/consts.py index b9e10f1680..af7c6a7354 100644 --- a/py/sentry_relay/consts.py +++ b/py/sentry_relay/consts.py @@ -4,7 +4,6 @@ from sentry_relay._lowlevel import lib from sentry_relay.utils import decode_str, encode_str - __all__ = ["DataCategory", "SPAN_STATUS_CODE_TO_NAME", "SPAN_STATUS_NAME_TO_CODE"] @@ -26,6 +25,7 @@ class DataCategory(IntEnum): MONITOR_SEAT = 13 USER_REPORT_V2 = 14 METRIC_BUCKET = 15 + SPAN_INDEXED = 16 UNKNOWN = -1 # end generated diff --git a/relay-base-schema/src/data_category.rs b/relay-base-schema/src/data_category.rs index 72502672c6..f83eb2f924 100644 --- a/relay-base-schema/src/data_category.rs +++ b/relay-base-schema/src/data_category.rs @@ -49,7 +49,7 @@ pub enum DataCategory { ProfileIndexed = 11, /// Span /// - /// Used for spans processed independently of transactions. + /// This is the category for spans from which we extracted metrics from. Span = 12, /// Monitor Seat /// @@ -65,6 +65,10 @@ pub enum DataCategory { UserReportV2 = 14, /// Metric buckets. MetricBucket = 15, + /// SpanIndexed + /// + /// This is the category for spans we store in full. + SpanIndexed = 16, // // 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. @@ -96,6 +100,7 @@ impl DataCategory { "monitor_seat" => Self::MonitorSeat, "feedback" => Self::UserReportV2, "metric_bucket" => Self::MetricBucket, + "span_indexed" => Self::SpanIndexed, _ => Self::Unknown, } } @@ -120,6 +125,7 @@ impl DataCategory { Self::MonitorSeat => "monitor_seat", Self::UserReportV2 => "feedback", Self::MetricBucket => "metric_bucket", + Self::SpanIndexed => "span_indexed", Self::Unknown => "unknown", } } diff --git a/relay-cabi/include/relay.h b/relay-cabi/include/relay.h index 96f88e4fc9..1277781b40 100644 --- a/relay-cabi/include/relay.h +++ b/relay-cabi/include/relay.h @@ -77,7 +77,7 @@ enum RelayDataCategory { /** * Span * - * Used for spans processed independently of transactions. + * This is the category for spans from which we extracted metrics from. */ RELAY_DATA_CATEGORY_SPAN = 12, /** @@ -100,6 +100,12 @@ enum RelayDataCategory { * Metric buckets. */ RELAY_DATA_CATEGORY_METRIC_BUCKET = 15, + /** + * SpanIndexed + * + * This is the category for spans we store in full. + */ + RELAY_DATA_CATEGORY_SPAN_INDEXED = 16, /** * Any other data category not known by this Relay. */ diff --git a/relay-quotas/src/quota.rs b/relay-quotas/src/quota.rs index d587c8ca85..ba56c78d5a 100644 --- a/relay-quotas/src/quota.rs +++ b/relay-quotas/src/quota.rs @@ -109,6 +109,7 @@ impl CategoryUnit { | DataCategory::TransactionProcessed | DataCategory::TransactionIndexed | DataCategory::Span + | DataCategory::SpanIndexed | DataCategory::MonitorSeat | DataCategory::Monitor | DataCategory::MetricBucket