4b6817381b
Benchmark image — build + push to ECR (any adapter) / build + push (push) Waiting to run
CI / quality (ubuntu-latest) (push) Waiting to run
CI / test (tools-runtime) (push) Waiting to run
CI / test (e2e-general) (push) Waiting to run
CI / test (cli-runtime) (push) Waiting to run
CI / test (e2e-provider-and-openclaw) (push) Waiting to run
CI / test (integrations-and-misc) (push) Waiting to run
CI / coverage-report (push) Blocked by required conditions
CI / test-kubernetes (push) Waiting to run
CI / should-run-thorough (push) Waiting to run
CI / test-thorough (cloudwatch-demo) (push) Blocked by required conditions
CI / test-thorough (flink-ecs) (push) Blocked by required conditions
CI / test-thorough (upstream-lambda) (push) Blocked by required conditions
CI / test-thorough (prefect-ecs-fargate) (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Release / build-binaries (zip, opensre.exe, onefile, windows-latest, windows-x64) (push) Blocked by required conditions
Release / publish-release (push) Blocked by required conditions
Release / publish-main-release (push) Blocked by required conditions
Release / prepare (push) Waiting to run
Release / verify (push) Blocked by required conditions
Release / build-python-dist (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, macos-15-intel, darwin-x64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, macos-latest, darwin-arm64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04, linux-x64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04-arm, linux-arm64) (push) Blocked by required conditions
Synthetic Deterministic Tests / Synthetic offline (deterministic) (push) Waiting to run
Interactive Shell Live (PR + post-merge) / turn-checks (no-LLM) (push) Waiting to run
Interactive Shell Live (PR + post-merge) / turn-live shard ${{ matrix.shard_index }} (push) Waiting to run
CI (OpenClaw E2E) / openclaw test (push) Has been cancelled
72 lines
2.8 KiB
Plaintext
72 lines
2.8 KiB
Plaintext
---
|
|
title: "Grafana Annotations"
|
|
---
|
|
|
|
Correlate incidents with **deployments and config changes** from any source. OpenSRE reads
|
|
[Grafana annotations](https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/) —
|
|
the standard, source-agnostic "what changed and when" marker — so the agent can answer
|
|
_"did a deploy or config change precede this alert?"_ even when the change did **not** come
|
|
from a GitHub push (ArgoCD/Flux syncs, `helm upgrade`, Jenkins/CircleCI jobs, Terraform
|
|
applies, manual hotfixes).
|
|
|
|
This complements the GitHub deploy timeline, which only sees GitHub-originated deploys.
|
|
|
|
## Requirements
|
|
|
|
No new setup or credentials — it reuses your existing **Grafana** integration. If Grafana is
|
|
connected (see [Grafana](/grafana)), the annotations tool is available automatically during
|
|
investigations.
|
|
|
|
## Parameters
|
|
|
|
| Parameter | Description |
|
|
| -------------------- | --------------------------------------------------------------------------- |
|
|
| `from` | ISO 8601 window start (e.g. `2026-05-30T14:00:00Z`). Overrides the default. |
|
|
| `to` | ISO 8601 window end. Overrides the default. |
|
|
| `tags` | Optional list of annotation tags to filter by (e.g. `["deployment"]`). |
|
|
| `time_range_minutes` | Window size when `from`/`to` are omitted (default `60`, ending now). |
|
|
| `limit` | Maximum annotations to return (default `100`). |
|
|
|
|
## Example
|
|
|
|
```text
|
|
query_grafana_annotations(from="2026-05-30T14:00:00Z", to="2026-05-30T15:00:00Z", tags=["deployment"])
|
|
```
|
|
|
|
```json
|
|
{
|
|
"source": "grafana_annotations",
|
|
"total": 1,
|
|
"annotations": [
|
|
{
|
|
"time": "2026-05-30T14:41:09Z",
|
|
"time_end": null,
|
|
"text": "deploy checkout-api v2.8.1",
|
|
"tags": ["deployment", "checkout-api"],
|
|
"dashboard_uid": null
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
Each annotation also carries `time_end` (set only for region annotations) and `dashboard_uid`
|
|
(set only when the annotation is attached to a dashboard); both are `null` otherwise.
|
|
|
|
The agent uses results like this to flag a likely change-induced regression and tie the
|
|
suspected root cause to a specific deploy.
|
|
|
|
## Emitting annotations
|
|
|
|
Make your deploys visible by writing a Grafana annotation when you ship. Most CD tools can
|
|
post to Grafana's annotations API, for example:
|
|
|
|
```bash
|
|
curl -s -X POST "$GRAFANA_URL/api/annotations" \
|
|
-H "Authorization: Bearer $GRAFANA_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"time": 1717079669000, "text": "deploy checkout-api v2.8.1", "tags": ["deployment", "checkout-api"]}'
|
|
```
|
|
|
|
Tagging deploy annotations consistently (e.g. `deployment`) lets the agent filter precisely
|
|
during an investigation.
|