sentry icon indicating copy to clipboard operation
sentry copied to clipboard

feat(parser): Rich invalid messages for aggregates in the searchBar

Open jennmueng opened this issue 3 years ago • 1 comments

Aggregates with no arguments weren't correctly being parsed due to #32879. This fixes that but also does more:

This is fixed by introducing that case back in but also we check the name of the aggregate as well that the aggregate is one that accepts percentages/durations/dates. But now this means we have to add all the valid duration and percentage keys to the sets defined in parser.tsx. But instead of rejecting the parse we instead show richer invalid messages.

Screen Shot 2022-08-01 at 2 02 04 PM Screen Shot 2022-08-01 at 2 01 48 PM Screen Shot 2022-08-01 at 1 49 27 PM

jennmueng avatar Jul 20 '22 22:07 jennmueng

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

github-actions[bot] avatar Jul 21 '22 18:07 github-actions[bot]

If all these tests pass (both backend and frontend) then all that's left on the TODO is adding tests for these new invalid messages

jennmueng avatar Aug 09 '22 18:08 jennmueng

Note, as discussed with @malwilley we need to follow up with having the value suggestions for transaction.duration return values with units, usually they default to ms when no units are provided but let's move away from that and require units.

jennmueng avatar Aug 11 '22 23:08 jennmueng