feat(explore) Adding count_unique, last_seen columns to occurrences dataset#110742
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| default_arg="timestamp", | ||
| ) | ||
| ], | ||
| ), |
There was a problem hiding this comment.
last_seen missing datetime processor returns raw float
Medium Severity
The last_seen aggregate definition lacks a processor=datetime_processor, so it returns a raw Unix timestamp float instead of an ISO-8601 date string. The EAP timestamp column in common_columns.py uses datetime_processor to convert its raw double value, and the non-EAP last_seen() definition returns a "date" type. Additionally, last_seen() is registered as a date_key in event_search.py. Without the processor, consumers expecting a formatted date string will receive a raw number, likely causing display issues in the UI.
| ) | ||
| ], | ||
| ), | ||
| "count_unique": count_unique_aggregate_definition(), |
| with self.options( | ||
| {EAPOccurrencesComparator._callsite_allowlist_option_name(): self.callsite_name} | ||
| ): |
There was a problem hiding this comment.
nit: this is on me cause i didn't do it in the initial PR but can we move this to do_request so when we don't need this option anymore we only have to update one spot?
There was a problem hiding this comment.
Will do, I have bunch more test and changes coming in. Will take care of it there.


Adds integration tests for the new occurrences EAP dataset on
/api/0/organizations/{org}/events/and/events-stats/ endpoints,introduced in #109727.
Add
count_unique()andlast_seen()columns for occurrences.