timeshifted
Description
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
source (logs|spans) timeshifted <interval>
Example
The timeshifted query is simple to employ for both logs and spans.
source logs timeshifted 1h
source spans timeshifted -1h
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:
source spans timeshifted -1h
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:
source logs timeshifted -1d