Skip to content

Commit

Permalink
fix(eap-api): Sentry can receive val_double in addition to `val_flo…
Browse files Browse the repository at this point in the history
…at` (#83566)

Update plan:
1. Sentry can receive doubles and floats
2. Snuba can receive and return doubles and floats. In the case of
aggregation, replace float with double. This is fine because Sentry
handles the case of receiving doubles already
3. Sentry asks for doubles only

---------

Co-authored-by: Rachel Chen <[email protected]>
  • Loading branch information
xurui-c and Rachel Chen authored Jan 16, 2025
1 parent 3c75f6d commit 549d834
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ rfc3986-validator>=0.1.1
sentry-arroyo>=2.19.9
sentry-kafka-schemas>=0.1.128
sentry-ophio==1.0.0
sentry-protos>=0.1.49
sentry-protos>=0.1.51
sentry-redis-tools>=0.1.7
sentry-relay>=0.9.4
sentry-sdk[http2]>=2.19.2
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ sentry-forked-djangorestframework-stubs==3.15.2.post1
sentry-forked-email-reply-parser==0.5.12.post1
sentry-kafka-schemas==0.1.128
sentry-ophio==1.0.0
sentry-protos==0.1.49
sentry-protos==0.1.51
sentry-redis-tools==0.1.7
sentry-relay==0.9.4
sentry-sdk==2.19.2
Expand Down
2 changes: 1 addition & 1 deletion requirements-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ sentry-arroyo==2.19.9
sentry-forked-email-reply-parser==0.5.12.post1
sentry-kafka-schemas==0.1.128
sentry-ophio==1.0.0
sentry-protos==0.1.49
sentry-protos==0.1.51
sentry-redis-tools==0.1.7
sentry-relay==0.9.4
sentry-sdk==2.19.2
Expand Down
1 change: 1 addition & 0 deletions src/sentry/search/eap/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
STRING = AttributeKey.TYPE_STRING
BOOLEAN = AttributeKey.TYPE_BOOLEAN
FLOAT = AttributeKey.TYPE_FLOAT
DOUBLE = AttributeKey.TYPE_DOUBLE
INT = AttributeKey.TYPE_INT

# TODO: we need a datetime type
Expand Down
3 changes: 3 additions & 0 deletions src/sentry/snuba/spans_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from sentry.search.eap.columns import ResolvedColumn, ResolvedFunction
from sentry.search.eap.constants import (
BOOLEAN,
DOUBLE,
FLOAT,
INT,
MAX_ROLLUP_POINTS,
Expand Down Expand Up @@ -142,6 +143,8 @@ def run_table_query(
result_value = result.val_int
elif resolved_column.proto_type == FLOAT:
result_value = result.val_float
elif resolved_column.proto_type == DOUBLE:
result_value = result.val_double
elif resolved_column.proto_type == BOOLEAN:
result_value = result.val_bool
result_value = process_value(result_value)
Expand Down

0 comments on commit 549d834

Please sign in to comment.