In order to serve suggestions (and potentially event counts), we need to preprocess the counts of all types of events sequences that have occurred in the history of ingested events. One way to do this is to maintain two indices, one with the state of an ordered sequence of events that have taken place for a given timestamp, and another a running count of the number of times a given event has followed another in the same trace.
ATs:
- A new index exists and can be written to/read from that stores the order of events that have been ingested for a given traceId by their timestamp
- A new index exists that can be written to/read from that stores the ongoing count of occurrences of sequences of events