Timeline now shows communications over all their periods
Long going issue
There had been an issue from the beginning with Timeline component and its representation:
- Items that have a duration, like Statuses, Http coms, TCP sessions and so, were only represented on the timeline at the beginning of the item.
- Doing more with a single query was highly costly, if even possible.
This meant that you could have a hole in the Timeline when in fact, there were ongoing communications in this time.
Things have changed: Elasticsearch improved!
- With ES 5.x, Elastic introduced 'range' data type that allows to define a range of numeric values or a range of time, a duration in other terms.
- With ES 7.4, Elastic have upgraded their histogram aggregation to manage ranges :) Yeah!
For range values, a document can fall into multiple buckets. The first bucket is computed from the lower bound of the range in the same way as a bucket for a single value is computed. The final bucket is computed in the same way from the upper bound of the range, and the range is counted in all buckets in between and including those two.
Reference : search-aggregations-bucket-histogram-aggregation
What it means is that, when performing an aggregation over a range field, ES is collecting in each histogram bar all items whose range intersect with the bar.
So doing, a long opened status will appear in all minutes / hours / days it is opened. Which is much better for the graphical representation :)
Implementation in Spider
- Nothing changed on Timeline component, nor on the UI queries, but I introduced date ranges fields in the resource, and now, all search queries use them.
- And... this is even a bit faster ;-)
Demo
We can see a long POST /create_session request, lasting 2.7s.

























