parca icon indicating copy to clipboard operation
parca copied to clipboard

Detect clock drift between browser and backend

Open javierhonduco opened this issue 3 years ago • 2 comments

Today no queries were working for me despite the profiles being sent to the server

image

I could not find the culprit, but luckily @brancz realise this could be a clock drift issue and indeed my dev box (which I use in headless mode) was 1h behind my laptop's time as it didn't adjust for winter time.

We should add a warning when the UI finds that there's a clock drift between the client and the server. Apparently Prometheus has this feature built-in

javierhonduco avatar Nov 01 '22 16:11 javierhonduco

Prometheus runs this query when first starting the UI: https://demo.pyrra.dev/prometheus/api/v1/query?query=time()

Given that we don't have PromQL and won't for the foreseeable future, I think having an extra gRPC method in the query service of Parca that returns the server's current timestamp makes probably sense.

metalmatze avatar Apr 04 '23 08:04 metalmatze

Makes sense!

brancz avatar Apr 04 '23 08:04 brancz