Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(spans): Add a data category for indexed spans #2937

Merged
merged 5 commits into from
Jan 11, 2024
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 @@ -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

Expand Down
1 change: 1 addition & 0 deletions py/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion py/sentry_relay/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]


Expand All @@ -26,6 +25,7 @@ class DataCategory(IntEnum):
MONITOR_SEAT = 13
USER_REPORT_V2 = 14
METRIC_BUCKET = 15
SPAN_INDEXED = 16
UNKNOWN = -1
# end generated

Expand Down
8 changes: 7 additions & 1 deletion relay-base-schema/src/data_category.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand All @@ -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.
Expand Down Expand Up @@ -96,6 +100,7 @@ impl DataCategory {
"monitor_seat" => Self::MonitorSeat,
"feedback" => Self::UserReportV2,
"metric_bucket" => Self::MetricBucket,
"span_indexed" => Self::SpanIndexed,
_ => Self::Unknown,
}
}
Expand All @@ -120,6 +125,7 @@ impl DataCategory {
Self::MonitorSeat => "monitor_seat",
Self::UserReportV2 => "feedback",
Self::MetricBucket => "metric_bucket",
Self::SpanIndexed => "span_indexed",
Self::Unknown => "unknown",
}
}
Expand Down
8 changes: 7 additions & 1 deletion relay-cabi/include/relay.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
/**
Expand All @@ -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.
*/
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 @@ -109,6 +109,7 @@ impl CategoryUnit {
| DataCategory::TransactionProcessed
| DataCategory::TransactionIndexed
| DataCategory::Span
| DataCategory::SpanIndexed
| DataCategory::MonitorSeat
| DataCategory::Monitor
| DataCategory::MetricBucket
Expand Down