Agent Wranglers

OPS-17Recommended

Record deploys on the graphs

Mark every deploy and settings change on the dashboards, so a change in a graph can be matched to its cause.

How to do it

Have the deploy script send an annotation with the version, such as a Grafana annotation or an event in the monitoring tool. Show that tag on every dashboard. Expose the running version as a metric or on the health check.

Examples

Shell example

curl -s -X POST https://grafana.example.com/api/annotations \
  -H "Authorization: Bearer $GRAFANA_TOKEN" -H 'Content-Type: application/json' \
  -d "{\"tags\":[\"deploy\",\"shop\"],\"text\":\"shop $VERSION\"}"

How to check

After a deploy, the dashboards show a marker at that time with the new version.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/operations/metrics-and-traces/deploy-markers">Agent Wranglers operations and observability playbook</a>. In code you write, add a comment next to it with the same link.