Repository navigation
feat(timeseries): Decode indexed transformations query parameters - #127057
Conversation
Decode ordered strings by axis position under the existing feature flag. Refs EXP-1302
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 3a2c363. Configure here.
| else: | ||
| return None | ||
|
|
||
| def get_transformations(self, request: Request) -> dict[int, list[str]]: |
There was a problem hiding this comment.
Would there be anywhere else we'd like to get transformations? Thinking if it would make sense to make this a broader util so other endpoints could use this
There was a problem hiding this comment.
At this point no, there are not plans to expand this beyond events-timeseries, and we're actually migrating all of dashboards to be based off of events-timeseries, as it is the defacto standard for any EAP timeseries related data.
adrianviquez
left a comment
There was a problem hiding this comment.
Small comments, otherwise lgtm
| except ValueError: | ||
| raise ParseError(detail="Invalid transformations index") | ||
| if index >= axis_count: | ||
| raise ParseError(detail="transformations index must match a yAxis position") |
There was a problem hiding this comment.
Nit: you capitalized the other errors, so in case you want to do the same for this one for consistency
There was a problem hiding this comment.
This is not capitalized because transformations is the raw query param that's being passed from the URL.
Add in a function to decode new
transformationsquery param on/events-timeseries/into ordered string lists keyed by the requestedyAxisposition.Example:
transformations[0]=fill(locf)&transformations[0]=smooth(sma)decodes to{0: ["fill(locf)", "smooth(sma)"]}.Validate indexed keys and axis bounds before query execution when
explore-interpolation-and-smoothingis enabled. Function strings remain opaque.Function validation and application are tracked separately in EXP-1279.
Closes EXP-1302.