Annotations seem to be offset to the right (by almost 1 s)

  • What Grafana version and what operating system are you using?

    • grafana/grafana:9.3.2 and influxdb:1.8.10 in Docker
    • Brave 1.47.171 Chromium: 109.0.5414.87 (Official Build) (arm64)
  • What are you trying to achieve?
    The larger goal: an automated, long-term performance trends monitoring, using k6 and Grafana. (I’m fairly new to this, so alternative suggestions to go about this are welcome.)
    The sub-goal: correctly delineate k6’s benchmark runs via Grafana’s annotations.

  • How are you trying to achieve it?

    1. Doing an HTTP POST of a start- and end-annotation in k6’s setup() and teardown() functions:
    export function setup() {
      postAnnotation(dashboardUID, panelId,, `${sha}: start`)
    1. Running a (mock) benchmark:
    k6 run --out influxdb=http://localhost:8086/db load.js --vus 10 --duration 10s
    1. Setting InfluxDB as Grafana’s data-source and visualizing the k6 metrics on the prebuilt dashboard.
  • What happened?
    By querying /api/annotations, I see that the start-annotation, the left one on the image, has both its time and timeEnd at 1675533882705, or 18:04:42**.705**, and was, I presume, rounded up and thus graphed at 18:04:43. (Similarly for end-annotation, with 861 milliseconds in its time and timeEnd.)

    On the other hand, the ‘table view’ in Grafana shows the first measurement, stored in InfluxDB, rounded down(?) to 18:04:42.

  • What did you expect to happen?
    All k6 benchmark measurements, which should’ve(?) been sent between its setup() and teardown() functions, should be graphed between the 2 annotations.