From a3f3c9af6a78caeb4eef5d4bfaa6ab14c4e48789 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Wed, 10 Jun 2026 12:42:48 -0700 Subject: [PATCH 1/3] feat(eap-items): populate name column from sentry.op and sentry.name Populate the new generic `name` column (added in #8016) in the EAP items consumer. The value is sourced per item type from the primary name attribute we commonly filter on: `sentry.op` for spans and `sentry.name` for metrics. The source attribute is still written into the attribute maps as before; this only promotes it into the dedicated indexed column. Declare the `name` column in the eap_items storage and all sibling storages (read-only, downsampled, and DLQ replay) so the read path sees it as well. Co-Authored-By: Claude Opus 4.8 (1M context) Agent transcript: https://claudescope.sentry.dev/share/RnmbvjU4NSsHdJEJwL_H0KFTCm_2y3okwyxmphZmzms --- rust_snuba/src/processors/eap_items.rs | 124 ++++++++++++++++-- .../storages/eap_items.yaml | 2 + .../storages/eap_items_dlq_replay.yaml | 2 + .../storages/eap_items_downsample_512.yaml | 2 + .../storages/eap_items_downsample_512_ro.yaml | 2 + .../storages/eap_items_downsample_64.yaml | 2 + .../storages/eap_items_downsample_64_ro.yaml | 2 + .../storages/eap_items_downsample_8.yaml | 2 + .../storages/eap_items_downsample_8_ro.yaml | 2 + .../storages/eap_items_ro.yaml | 2 + 10 files changed, 131 insertions(+), 11 deletions(-) diff --git a/rust_snuba/src/processors/eap_items.rs b/rust_snuba/src/processors/eap_items.rs index dc49dc8c44c..b28798731f9 100644 --- a/rust_snuba/src/processors/eap_items.rs +++ b/rust_snuba/src/processors/eap_items.rs @@ -261,6 +261,10 @@ struct EAPItem { trace_id: Uuid, item_id: u128, + /// Per-item-type primary name attribute, promoted to a dedicated column. + /// Sourced from `sentry.op` for spans and `sentry.name` for metrics. + name: String, + #[serde(flatten)] attributes: AttributeMap, @@ -279,6 +283,25 @@ impl TryFrom for EAPItem { fn try_from(from: TraceItem) -> Result { let timestamp = from.timestamp.context("Expected a timestamp")?; + + // Promote the per-item-type primary name attribute into a dedicated + // `name` column: `sentry.op` for spans, `sentry.name` for metrics. + // Read it before `from.attributes` is consumed by the loop below; + // the attribute is also still written to the attribute maps. + let item_type = + TraceItemType::try_from(from.item_type).unwrap_or(TraceItemType::Unspecified); + let name = match item_type { + TraceItemType::Span => Some("sentry.op"), + TraceItemType::Metric => Some("sentry.name"), + _ => None, + } + .and_then(|key| from.attributes.get(key)) + .and_then(|value| match &value.value { + Some(Value::StringValue(string)) => Some(string.clone()), + _ => None, + }) + .unwrap_or_default(); + let mut eap_item = EAPItem { organization_id: from.organization_id, project_id: from.project_id, @@ -286,6 +309,7 @@ impl TryFrom for EAPItem { trace_id: Uuid::parse_str(&from.trace_id)?, item_id: read_item_id(from.item_id)?, timestamp: timestamp.seconds as u32, + name, attributes: Default::default(), retention_days: Default::default(), downsampled_retention_days: Default::default(), @@ -467,6 +491,8 @@ pub struct EAPItemRow { trace_id: Uuid, item_id: u128, + name: String, + sampling_weight: u64, sampling_factor: f64, client_sample_rate: f64, @@ -511,6 +537,7 @@ impl EAPItemRow { "timestamp", "trace_id", "item_id", + "name", "sampling_weight", "sampling_factor", "client_sample_rate", @@ -545,6 +572,7 @@ impl TryFrom for EAPItemRow { timestamp: item.timestamp, trace_id: item.trace_id, item_id: item.item_id, + name: item.name, sampling_weight: item.sampling_weight, sampling_factor: item.sampling_factor, client_sample_rate: item.client_sample_rate, @@ -976,20 +1004,23 @@ mod tests { #[test] fn test_column_names_match_struct_layout() { let names = EAPItemRow::COLUMN_NAMES; - // 12 scalars + attributes_bool + attributes_int + 80 buckets + attributes_array - assert_eq!(names.len(), 95); + // 12 scalars + name + attributes_bool + attributes_int + 80 buckets + attributes_array + assert_eq!(names.len(), 96); assert_eq!(names[0], "organization_id"); - assert_eq!(names[7], "sampling_factor"); - assert_eq!(names[8], "client_sample_rate"); - assert_eq!(names[9], "server_sample_rate"); + assert_eq!(names[5], "item_id"); + assert_eq!(names[6], "name"); + assert_eq!(names[7], "sampling_weight"); + assert_eq!(names[8], "sampling_factor"); + assert_eq!(names[9], "client_sample_rate"); + assert_eq!(names[10], "server_sample_rate"); // Bucket pairs are interleaved (string_N then float_N) per the // `seq_attrs!` expansion on EAPItemRow. - assert_eq!(names[14], "attributes_string_0"); - assert_eq!(names[15], "attributes_float_0"); - assert_eq!(names[16], "attributes_string_1"); - assert_eq!(names[92], "attributes_string_39"); - assert_eq!(names[93], "attributes_float_39"); - assert_eq!(names[94], "attributes_array"); + assert_eq!(names[15], "attributes_string_0"); + assert_eq!(names[16], "attributes_float_0"); + assert_eq!(names[17], "attributes_string_1"); + assert_eq!(names[93], "attributes_string_39"); + assert_eq!(names[94], "attributes_float_39"); + assert_eq!(names[95], "attributes_array"); } #[test] @@ -1210,6 +1241,77 @@ mod tests { assert!(row.attributes_array.contains("elem")); } + #[test] + fn test_name_from_sentry_op_for_spans() { + let item_id = Uuid::new_v4(); + let mut trace_item = generate_trace_item(item_id); + trace_item.item_type = TraceItemType::Span.into(); + trace_item.attributes.insert( + "sentry.op".to_string(), + AnyValue { + value: Some(Value::StringValue("db.query".to_string())), + }, + ); + + let eap_item = EAPItem::try_from(trace_item).unwrap(); + assert_eq!(eap_item.name, "db.query"); + } + + #[test] + fn test_name_from_sentry_name_for_metrics() { + let item_id = Uuid::new_v4(); + let mut trace_item = generate_trace_item(item_id); + trace_item.item_type = TraceItemType::Metric.into(); + trace_item.attributes.insert( + "sentry.name".to_string(), + AnyValue { + value: Some(Value::StringValue("my.metric".to_string())), + }, + ); + + let eap_item = EAPItem::try_from(trace_item).unwrap(); + assert_eq!(eap_item.name, "my.metric"); + } + + #[test] + fn test_name_empty_when_source_attribute_missing() { + let item_id = Uuid::new_v4(); + let mut trace_item = generate_trace_item(item_id); + trace_item.item_type = TraceItemType::Span.into(); + // No sentry.op attribute set. + + let eap_item = EAPItem::try_from(trace_item).unwrap(); + assert_eq!(eap_item.name, ""); + } + + #[test] + fn test_name_serialized_in_row_binary() { + let item_id = Uuid::new_v4(); + let mut trace_item = generate_trace_item(item_id); + trace_item.item_type = TraceItemType::Span.into(); + trace_item.attributes.insert( + "sentry.op".to_string(), + AnyValue { + value: Some(Value::StringValue("http.server".to_string())), + }, + ); + + let mut payload = Vec::new(); + trace_item.encode(&mut payload).unwrap(); + + let payload = KafkaPayload::new(None, None, Some(payload)); + let meta = KafkaMessageMetadata { + partition: 0, + offset: 1, + timestamp: DateTime::from(SystemTime::now()), + }; + + let batch = process_message_row_binary_typed(payload, meta, &ProcessorConfig::default()) + .expect("The message should be processed"); + + assert_eq!(batch.rows[0].name, "http.server"); + } + #[test] fn test_row_binary_sampling_rates() { let item_id = Uuid::new_v4(); diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items.yaml index f521925b85e..f5c1b68e9ae 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items.yaml @@ -22,6 +22,8 @@ schema: { name: retention_days, type: UInt, args: { size: 16 } }, { name: downsampled_retention_days, type: UInt, args: { size: 16 } }, + { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_dlq_replay.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_dlq_replay.yaml index 9a11bbd4c5a..a748c20815c 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_dlq_replay.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_dlq_replay.yaml @@ -22,6 +22,8 @@ schema: { name: retention_days, type: UInt, args: { size: 16 } }, { name: downsampled_retention_days, type: UInt, args: { size: 16 } }, + { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512.yaml index c333a87df3b..7c18c561adf 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512.yaml @@ -21,6 +21,8 @@ schema: { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, + { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512_ro.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512_ro.yaml index b50e0c39e44..ed02dabfc76 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512_ro.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512_ro.yaml @@ -21,6 +21,8 @@ schema: { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, + { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64.yaml index 9b2b8ff3df9..3c2cbb16022 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64.yaml @@ -21,6 +21,8 @@ schema: { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, + { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64_ro.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64_ro.yaml index 525eb385df1..6fc7402c30f 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64_ro.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64_ro.yaml @@ -21,6 +21,8 @@ schema: { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, + { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8.yaml index 84d680f6550..63c605d324f 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8.yaml @@ -21,6 +21,8 @@ schema: { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, + { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8_ro.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8_ro.yaml index d294434663b..9b250e68cbc 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8_ro.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8_ro.yaml @@ -21,6 +21,8 @@ schema: { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, + { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_ro.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_ro.yaml index 6ae4a8b5bee..a26a201541e 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_ro.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_ro.yaml @@ -22,6 +22,8 @@ schema: { name: retention_days, type: UInt, args: { size: 16 } }, { name: downsampled_retention_days, type: UInt, args: { size: 16 } }, + { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, From e33211ac61b49369d88d3b98d3f321278694b353 Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 16 Jun 2026 11:13:33 -0700 Subject: [PATCH 2/3] fix(eap-items): rename name column to indexed_name to match migration Migration 0057 (#8016) created the column as `indexed_name` with the `bf_indexed_name` bloom-filter index, but this PR declared and wrote `name`, so the schema-consistency check failed ("Column 'name' exists in schema but not local ClickHouse") and the consumer would have inserted a non-existent column. Rename `name` -> `indexed_name` in the EAP items processor (struct fields, RowBinary column list, tests) and in all eap_items storage configs. Also position the column after `retention_days` (matching the migration's `AFTER retention_days`) and drop the `low_cardinality` modifier so the storage type matches the plain `String` the migration created. Co-Authored-By: Claude Opus 4.8 (1M context) --- rust_snuba/src/processors/eap_items.rs | 38 +++++++++---------- .../storages/eap_items.yaml | 3 +- .../storages/eap_items_dlq_replay.yaml | 3 +- .../storages/eap_items_downsample_512.yaml | 2 +- .../storages/eap_items_downsample_512_ro.yaml | 2 +- .../storages/eap_items_downsample_64.yaml | 2 +- .../storages/eap_items_downsample_64_ro.yaml | 2 +- .../storages/eap_items_downsample_8.yaml | 2 +- .../storages/eap_items_downsample_8_ro.yaml | 2 +- .../storages/eap_items_ro.yaml | 3 +- 10 files changed, 28 insertions(+), 31 deletions(-) diff --git a/rust_snuba/src/processors/eap_items.rs b/rust_snuba/src/processors/eap_items.rs index b28798731f9..cbb13aa5085 100644 --- a/rust_snuba/src/processors/eap_items.rs +++ b/rust_snuba/src/processors/eap_items.rs @@ -263,7 +263,7 @@ struct EAPItem { /// Per-item-type primary name attribute, promoted to a dedicated column. /// Sourced from `sentry.op` for spans and `sentry.name` for metrics. - name: String, + indexed_name: String, #[serde(flatten)] attributes: AttributeMap, @@ -285,12 +285,12 @@ impl TryFrom for EAPItem { let timestamp = from.timestamp.context("Expected a timestamp")?; // Promote the per-item-type primary name attribute into a dedicated - // `name` column: `sentry.op` for spans, `sentry.name` for metrics. - // Read it before `from.attributes` is consumed by the loop below; - // the attribute is also still written to the attribute maps. + // `indexed_name` column: `sentry.op` for spans, `sentry.name` for + // metrics. Read it before `from.attributes` is consumed by the loop + // below; the attribute is also still written to the attribute maps. let item_type = TraceItemType::try_from(from.item_type).unwrap_or(TraceItemType::Unspecified); - let name = match item_type { + let indexed_name = match item_type { TraceItemType::Span => Some("sentry.op"), TraceItemType::Metric => Some("sentry.name"), _ => None, @@ -309,7 +309,7 @@ impl TryFrom for EAPItem { trace_id: Uuid::parse_str(&from.trace_id)?, item_id: read_item_id(from.item_id)?, timestamp: timestamp.seconds as u32, - name, + indexed_name, attributes: Default::default(), retention_days: Default::default(), downsampled_retention_days: Default::default(), @@ -491,7 +491,7 @@ pub struct EAPItemRow { trace_id: Uuid, item_id: u128, - name: String, + indexed_name: String, sampling_weight: u64, sampling_factor: f64, @@ -537,7 +537,7 @@ impl EAPItemRow { "timestamp", "trace_id", "item_id", - "name", + "indexed_name", "sampling_weight", "sampling_factor", "client_sample_rate", @@ -572,7 +572,7 @@ impl TryFrom for EAPItemRow { timestamp: item.timestamp, trace_id: item.trace_id, item_id: item.item_id, - name: item.name, + indexed_name: item.indexed_name, sampling_weight: item.sampling_weight, sampling_factor: item.sampling_factor, client_sample_rate: item.client_sample_rate, @@ -1004,11 +1004,11 @@ mod tests { #[test] fn test_column_names_match_struct_layout() { let names = EAPItemRow::COLUMN_NAMES; - // 12 scalars + name + attributes_bool + attributes_int + 80 buckets + attributes_array + // 12 scalars + indexed_name + attributes_bool + attributes_int + 80 buckets + attributes_array assert_eq!(names.len(), 96); assert_eq!(names[0], "organization_id"); assert_eq!(names[5], "item_id"); - assert_eq!(names[6], "name"); + assert_eq!(names[6], "indexed_name"); assert_eq!(names[7], "sampling_weight"); assert_eq!(names[8], "sampling_factor"); assert_eq!(names[9], "client_sample_rate"); @@ -1242,7 +1242,7 @@ mod tests { } #[test] - fn test_name_from_sentry_op_for_spans() { + fn test_indexed_name_from_sentry_op_for_spans() { let item_id = Uuid::new_v4(); let mut trace_item = generate_trace_item(item_id); trace_item.item_type = TraceItemType::Span.into(); @@ -1254,11 +1254,11 @@ mod tests { ); let eap_item = EAPItem::try_from(trace_item).unwrap(); - assert_eq!(eap_item.name, "db.query"); + assert_eq!(eap_item.indexed_name, "db.query"); } #[test] - fn test_name_from_sentry_name_for_metrics() { + fn test_indexed_name_from_sentry_name_for_metrics() { let item_id = Uuid::new_v4(); let mut trace_item = generate_trace_item(item_id); trace_item.item_type = TraceItemType::Metric.into(); @@ -1270,22 +1270,22 @@ mod tests { ); let eap_item = EAPItem::try_from(trace_item).unwrap(); - assert_eq!(eap_item.name, "my.metric"); + assert_eq!(eap_item.indexed_name, "my.metric"); } #[test] - fn test_name_empty_when_source_attribute_missing() { + fn test_indexed_name_empty_when_source_attribute_missing() { let item_id = Uuid::new_v4(); let mut trace_item = generate_trace_item(item_id); trace_item.item_type = TraceItemType::Span.into(); // No sentry.op attribute set. let eap_item = EAPItem::try_from(trace_item).unwrap(); - assert_eq!(eap_item.name, ""); + assert_eq!(eap_item.indexed_name, ""); } #[test] - fn test_name_serialized_in_row_binary() { + fn test_indexed_name_serialized_in_row_binary() { let item_id = Uuid::new_v4(); let mut trace_item = generate_trace_item(item_id); trace_item.item_type = TraceItemType::Span.into(); @@ -1309,7 +1309,7 @@ mod tests { let batch = process_message_row_binary_typed(payload, meta, &ProcessorConfig::default()) .expect("The message should be processed"); - assert_eq!(batch.rows[0].name, "http.server"); + assert_eq!(batch.rows[0].indexed_name, "http.server"); } #[test] diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items.yaml index f5c1b68e9ae..df5eaf469bb 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items.yaml @@ -20,10 +20,9 @@ schema: { name: sampling_weight, type: UInt, args: { size: 64 } }, { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, + { name: indexed_name, type: String }, { name: downsampled_retention_days, type: UInt, args: { size: 16 } }, - { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, - { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_dlq_replay.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_dlq_replay.yaml index a748c20815c..4462bc18af8 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_dlq_replay.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_dlq_replay.yaml @@ -20,10 +20,9 @@ schema: { name: sampling_weight, type: UInt, args: { size: 64 } }, { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, + { name: indexed_name, type: String }, { name: downsampled_retention_days, type: UInt, args: { size: 16 } }, - { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, - { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512.yaml index 7c18c561adf..8adc09873c9 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512.yaml @@ -21,7 +21,7 @@ schema: { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, - { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: indexed_name, type: String }, { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512_ro.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512_ro.yaml index ed02dabfc76..30b471aa223 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512_ro.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_512_ro.yaml @@ -21,7 +21,7 @@ schema: { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, - { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: indexed_name, type: String }, { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64.yaml index 3c2cbb16022..f0863958384 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64.yaml @@ -21,7 +21,7 @@ schema: { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, - { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: indexed_name, type: String }, { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64_ro.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64_ro.yaml index 6fc7402c30f..e9461de4f53 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64_ro.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_64_ro.yaml @@ -21,7 +21,7 @@ schema: { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, - { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: indexed_name, type: String }, { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8.yaml index 63c605d324f..0fa40fec786 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8.yaml @@ -21,7 +21,7 @@ schema: { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, - { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: indexed_name, type: String }, { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8_ro.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8_ro.yaml index 9b250e68cbc..32b0595c9b6 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8_ro.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_downsample_8_ro.yaml @@ -21,7 +21,7 @@ schema: { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, - { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, + { name: indexed_name, type: String }, { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, diff --git a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_ro.yaml b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_ro.yaml index a26a201541e..74a77e3d262 100644 --- a/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_ro.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/storages/eap_items_ro.yaml @@ -20,10 +20,9 @@ schema: { name: sampling_weight, type: UInt, args: { size: 64 } }, { name: sampling_factor, type: Float, args: { size: 64 } }, { name: retention_days, type: UInt, args: { size: 16 } }, + { name: indexed_name, type: String }, { name: downsampled_retention_days, type: UInt, args: { size: 16 } }, - { name: name, type: String, args: { schema_modifiers: [ low_cardinality ] } }, - { name: attributes_bool, type: Map, args: { key: { type: String }, value: { type: Bool } } }, { name: attributes_int, type: Map, args: { key: { type: String }, value: { type: Int, args: { size: 64 } } } }, From f2e3bdbb25da0c42b0f117823c056c8ab48b83db Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 16 Jun 2026 11:43:25 -0700 Subject: [PATCH 3/3] test(eap-items): add indexed_name to EAPItemsProcessor schema snapshot The processor schema snapshot test serializes a full EAP row, which now includes the `indexed_name` column. Add the field (empty for this fixture, which has no sentry.op/sentry.name attribute) to the stored snapshot. Co-Authored-By: Claude Opus 4.8 (1M context) Agent transcript: https://claudescope.sentry.dev/share/_y1_VjnjSGBCTuaA2WF1oIJiUhT0ke-d4IH-mgBUyuY --- ...a-items-EAPItemsProcessor-snuba-items__1__basic.protobuf.snap | 1 + 1 file changed, 1 insertion(+) diff --git a/rust_snuba/src/processors/snapshots/rust_snuba__processors__tests__schemas@snuba-items-EAPItemsProcessor-snuba-items__1__basic.protobuf.snap b/rust_snuba/src/processors/snapshots/rust_snuba__processors__tests__schemas@snuba-items-EAPItemsProcessor-snuba-items__1__basic.protobuf.snap index 9e9ee450e2c..c2f54f0e5b0 100644 --- a/rust_snuba/src/processors/snapshots/rust_snuba__processors__tests__schemas@snuba-items-EAPItemsProcessor-snuba-items__1__basic.protobuf.snap +++ b/rust_snuba/src/processors/snapshots/rust_snuba__processors__tests__schemas@snuba-items-EAPItemsProcessor-snuba-items__1__basic.protobuf.snap @@ -29,6 +29,7 @@ expression: snapshot_payload }, "client_sample_rate": 1.0, "downsampled_retention_days": 90, + "indexed_name": "", "item_id": 140754042156678400000000000000000000000.0, "item_type": 1, "organization_id": 1,