Quickstart
Your first push
Driftmetrics stores numbers your build already prints and keeps their history. One HTTP call from CI is the whole integration.
Four steps
- Sign in at app.driftmetrics.watch. The first sign-in creates your organization. Create a project in it: the wizard asks for the axis key (default
version), its kind and the mode. - Open the project, then Settings → Write tokens, and create a write token. Copy it once and store it as a CI secret (
DRIFT_TOKENbelow). - Push a run. Tags identify it; metrics are the numbers.
curl --fail-with-body --retry 3 -X POST https://api.driftmetrics.watch/v1/push \ -H "Authorization: Bearer $DRIFT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "runs": [ { "tags": {"version":"v2.5.0","platform":"linux-x64","build":"release"}, "metrics": [ {"name":"binary_size","value":2.14,"unit":"MB","direction":"lower_is_better"}, {"name":"peak_ram","value":419,"unit":"KB","direction":"lower_is_better"}, {"name":"latency_ms","value":41.6,"unit":"ms","direction":"lower_is_better"} ], "meta": {"commit":"9f2c1ab","ci":"https://github.com/acme/app/actions/runs/812"} } ] }'In GitHub Actions that is one step:- name: Push metrics env: DRIFT_TOKEN: ${{ secrets.DRIFT_TOKEN }} run: | curl -X POST https://api.driftmetrics.watch/v1/push \ -H "Authorization: Bearer $DRIFT_TOKEN" \ -H "Content-Type: application/json" \ -d @metrics.json - Open the project. It opens on its default dashboard, with suggested widgets until you create one. Explore charts every metric along the axis under any filter, and the diff compares any two axis values. The push response already carries each value against the previous run, so CI can print the deltas too.
Next
How it works explains tags, the axis, the two project modes and dashboards. API reference lists every field.