From 4f931bdaebdf482adf0d5030c46e52a91f2461e7 Mon Sep 17 00:00:00 2001 From: davidtsuk <132949946+davidtsuk@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:19:59 -0800 Subject: [PATCH] Use a reliability enum instead of boolean (#65) * Use a reliability enum instead of boolean * swap reliabilities --- proto/sentry_protos/snuba/v1/endpoint_time_series.proto | 5 +++-- .../sentry_protos/snuba/v1/endpoint_trace_item_table.proto | 1 + proto/sentry_protos/snuba/v1/trace_item_attribute.proto | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/proto/sentry_protos/snuba/v1/endpoint_time_series.proto b/proto/sentry_protos/snuba/v1/endpoint_time_series.proto index ef7aa86..cc9e17d 100644 --- a/proto/sentry_protos/snuba/v1/endpoint_time_series.proto +++ b/proto/sentry_protos/snuba/v1/endpoint_time_series.proto @@ -20,8 +20,9 @@ message DataPoint { // optional, if not set, assume true. Accounts for sparse time series bool data_present = 2; float avg_sampling_rate = 3; - bool is_reliable = 4; - // determines whether the aggregation is reliable using math based on confidence intervals and sample size + bool is_reliable = 4 [deprecated = true]; + // determines the reliability of the aggregation using math based on confidence intervals and sample size + Reliability reliability = 5; } message TimeSeries { diff --git a/proto/sentry_protos/snuba/v1/endpoint_trace_item_table.proto b/proto/sentry_protos/snuba/v1/endpoint_trace_item_table.proto index 4708e70..937b414 100644 --- a/proto/sentry_protos/snuba/v1/endpoint_trace_item_table.proto +++ b/proto/sentry_protos/snuba/v1/endpoint_trace_item_table.proto @@ -34,6 +34,7 @@ message Column { message TraceItemColumnValues { string attribute_name = 1; repeated AttributeValue results = 2; + repeated Reliability reliabilities = 3; } message TraceItemTableResponse { diff --git a/proto/sentry_protos/snuba/v1/trace_item_attribute.proto b/proto/sentry_protos/snuba/v1/trace_item_attribute.proto index b1d927b..053987e 100644 --- a/proto/sentry_protos/snuba/v1/trace_item_attribute.proto +++ b/proto/sentry_protos/snuba/v1/trace_item_attribute.proto @@ -83,3 +83,9 @@ message AttributeAggregation { string label = 3; ExtrapolationMode extrapolation_mode = 4; } + +enum Reliability { + RELIABILITY_UNSPECIFIED = 0; + RELIABILITY_LOW = 1; + RELIABILITY_HIGH = 2; +}