Metrics

The numbers your business runs on

Counters, gauges and timings from your own code — orders placed, emails sent, queue depth, PDF render time — charted over any range and split by tag.

What you get

Three kinds, one call

increment() for things that happen, gauge() for levels, timing() for durations. Each takes optional tags such as route or plan.

Split by tag

See a metric for one route, one plan or one region with a click, from the tags you already send.

Requests measure themselves

The request middleware reports http.requests and http.duration for every route without extra code.

Alerts on any metric

Get told when a metric goes above or below a threshold, or when it drifts far from its usual hour.

How it looks

Grafatsuki::increment('payments.succeeded', ['plan' => 'pro']);
Grafatsuki::gauge('queue.pending', $pending);
Grafatsuki::timing('pdf.render', $ms);

Questions

Do I need to run an agent or exporter?

No. Your app sends metrics over HTTPS with its token; nothing runs on your server besides your app.

Can I chart metrics on a dashboard?

Yes — with a query such as "metric http.duration | avg by time", drawn as a line, bars or a single number.

How are tags stored?

Up to 20 tags per point, as short strings. They are what "split by tag" and query filters read.

Also in Grafatsuki

Plant your first app in five minutes

Free to start. One link, one token — or one prompt for your coding agent.