Skip to content

fix(sg/ci): put grafana query date slightly in the future

Administrator requested to merge wb/ci/grafana-time into main

Created by: burmudar

Looking at generated grafana queries in the wild the queries didn't return anything 😭 Narrowed it down to the time range.

See this query. If you change the end to be 30 secs later, the query will return data.

This change the end range is shifted to be 5 mins in the future (from posting) to give Loki sometime to do it's thing and our generated query returns data!

I am also removing the job id from the generated query since on a build like this when you click on view grafana logs. It takes you to grafana and queries for the upload trace job, which leads to a bad experience since you think "the query doesn't work 🤷🏼"

Test plan

Copied the granfana query bash to another script and executed it there with fake environment variables.

Merge request reports

Loading