From 46f55141bce99d81f984dd99675d20796bab1e87 Mon Sep 17 00:00:00 2001 From: Colin Chartier Date: Tue, 13 Aug 2024 12:08:01 -0400 Subject: [PATCH 1/2] feat(eap): Add the TimeSeriesProcessor to entities/eap_spans --- .../events_analytics_platform/entities/eap_spans.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/snuba/datasets/configuration/events_analytics_platform/entities/eap_spans.yaml b/snuba/datasets/configuration/events_analytics_platform/entities/eap_spans.yaml index 42fe1c8af8..77c9dd61e3 100644 --- a/snuba/datasets/configuration/events_analytics_platform/entities/eap_spans.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/entities/eap_spans.yaml @@ -54,7 +54,14 @@ storages: storage_selector: selector: DefaultQueryStorageSelector -query_processors: [] +query_processors: + - processor: TimeSeriesProcessor + args: + time_group_columns: + time: _sort_timestamp + time_parse_columns: + - start_timestamp + - end_timestamp validate_data_model: error validators: From fa5e80c63141458fbc1f157aa74daed1d9fd0c20 Mon Sep 17 00:00:00 2001 From: Colin Chartier Date: Tue, 13 Aug 2024 15:20:57 -0400 Subject: [PATCH 2/2] Add TimeSeriesProcessor --- .../events_analytics_platform/entities/eap_spans.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/snuba/datasets/configuration/events_analytics_platform/entities/eap_spans.yaml b/snuba/datasets/configuration/events_analytics_platform/entities/eap_spans.yaml index 77c9dd61e3..d277ee75d9 100644 --- a/snuba/datasets/configuration/events_analytics_platform/entities/eap_spans.yaml +++ b/snuba/datasets/configuration/events_analytics_platform/entities/eap_spans.yaml @@ -13,6 +13,8 @@ schema: { name: segment_id, type: UInt, args: { size: 64 } }, { name: segment_name, type: String }, { name: is_segment, type: UInt, args: { size: 8 } }, + { name: time, type: DateTime }, # virtual column, used by TimeSeriesProcessor + { name: timestamp, type: DateTime }, # virtual column, mapped to _sort_timestamp { name: start_timestamp, type: DateTime64, args: { precision: 6 } }, { name: end_timestamp, type: DateTime64, args: { precision: 6 } }, { name: duration_ms, type: UInt, args: { size: 32 } }, @@ -34,7 +36,7 @@ storages: - mapper: ColumnToColumn args: from_table_name: null - from_col_name: start_timestamp + from_col_name: timestamp to_table_name: null to_col_name: _sort_timestamp subscriptables: @@ -58,7 +60,7 @@ query_processors: - processor: TimeSeriesProcessor args: time_group_columns: - time: _sort_timestamp + time: timestamp time_parse_columns: - start_timestamp - end_timestamp @@ -69,4 +71,4 @@ validators: args: required_filter_columns: [organization_id] -required_time_column: start_timestamp +required_time_column: timestamp