-
-
Notifications
You must be signed in to change notification settings - Fork 62
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: formula queries in EndpointTraceItemTable #6844
Conversation
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
144f7e0
to
793b372
Compare
@@ -29,7 +29,7 @@ python-rapidjson==1.8 | |||
redis==4.5.4 | |||
sentry-arroyo==2.19.12 | |||
sentry-kafka-schemas==0.1.129 | |||
sentry-protos==0.1.55 | |||
sentry-protos==0.1.58 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new protobuf definition with support for formulas, see getsentry/sentry-protos#105
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if people try to use formulas in Timeseries Endpoint it returns a not-implemented-error. I will implement support for formulas in timeseries endpoint as my next PR.
So this implements formulas only for spans. How much work would it be to support it for all trace item types |
snuba/web/rpc/v1/resolvers/R_eap_spans/resolver_trace_item_table.py
Outdated
Show resolved
Hide resolved
It would be non-trivial to extend this PR to support all data types, we will leave it as span only |
f524c98
to
6d91e4e
Compare
This PR implements support for formulas in the TraceItemTable endpoint. It is relevant to this ticket https://github.com/orgs/getsentry/projects/284/views/1?pane=issue&itemId=85243940&issue=getsentry%7Ceap-planning%7C27
It enables queries such as
sum(my_attribute) / count(my_attribute)
which werent possible beforeMajor changes
_get_reliability_context_columns
and_column_to_expression
. (i.e. the logic stayed the same but its not inside these functions)_column_to_expression
to support formulas https://github.com/getsentry/snuba/pull/6844/files#diff-e1e06d7f875a7c2870cc11bc4301dd6ab9fba73263c76260452c0b3176f66110R180-R191Testing
I wrote 3 new tests for this feature:
sum(my_attribute) / count(my_attribute)
my_attribute + my_other_attribute
design decisions
my_attribute * 10
if we need support for this it must be implemented as a follow up. and will require further modification of our protobuf grammar.