-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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(eap-spans): implement time_spent_percentage
#88117
feat(eap-spans): implement time_spent_percentage
#88117
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #88117 +/- ##
===========================================
+ Coverage 42.15% 87.72% +45.56%
===========================================
Files 9962 9994 +32
Lines 564080 565788 +1708
Branches 22269 22269
===========================================
+ Hits 237807 496353 +258546
+ Misses 325851 69013 -256838
Partials 422 422 |
…spent_percentage-function
@@ -235,6 +235,8 @@ class FunctionDefinition: | |||
extrapolation: bool = True | |||
# Processor is the function run in the post process step to transform a row into the final result | |||
processor: Callable[[Any], Any] | None = None | |||
# returns true if the function should be enabled for the given request else returns false with a reason why it is not enabled | |||
check_if_enabled: Callable[[SnubaParams], tuple[bool, str]] | None = None |
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.
Could we follow the pattern from QueryBuilders?
- Add
private
here - In the
SearchResolverConfig
add afunctions_acl
- Table queries get
SearchResolverConfig(functions_acl=["time_spent_percentage"])
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.
I like that suggestion, makes more sense to gate this at the time of the resolver instantiation versus in the resolver as we know if it will be a timeseries request by that point
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.
After thinking about it, lets move from check_if_enabled
to a function_acl in a follow up, the rest of this seems reasonable to me
Add `functions_acl` and replace `FunctionDefinition.check_if_enabled` as discussed in #88117
Add `functions_acl` and replace `FunctionDefinition.check_if_enabled` as discussed in #88117
closes https://github.com/getsentry/eap-planning/issues/162