timeshifted - Shift the time range for this query
The timeshifted
keyword modifies the timerange within the scope of the query. This is useful when, for example, a custom dashboard has a global timerange of Today
but your query only makes sense when looking at yesterday's data.
Syntax
Example - Basic usage
The timeshifted
query is simple to employ for both logs
and spans
.
To provide a worked example, assume the current timerange in the Coralogix interface is set to Last 1 Hour
, and we run the following query:
This is going to execute the query from now - 2h
to now - 1h
. It has shifted the entire time window back one hour.
Try it yourself
Open up your Coralogix explore screen and paste in the following query:
Theme
Light