Currently the rate function considers only the passed time range without checking the exact timestamp of the event.
So in your case the final formula would be:
3/(2.2.2024 15:00-2.2.2024 10:00)
In your case it looks like you're instead interested in the exact timing of the first event (10:30) but will like to stretch the final timespan until the end of the provided time range rather than the latest event (15:00 vs 14:30): did I get it correctly?
Ok, I see what you mean.
That is not possible yet. The rate function in ES currently has not that kind of precision to calculate the timespan: it will take into account the "date bucket" vs the specific event timing.
Without ES|QL support it is really hard to compute right now in Kibana as a rate function requires a date histogram to be associated with it, and a Metric doesn't allow to define a rate + a date histogram without some tricks.
The only one I can think of is the compute of an average rate for a given time range:
select a Metric chart in Lens
Define a Date histogram break down and configure with a Collapse by Average
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.