Skip to content
Try Hanzo
Language: English (United States)

Hanzo Metrics

The metrics half of Hanzo O11y

View on GitHub
metrics.hanzo.airate(http_requests_total[5m])
  • zen
  • kai
  • enso

a spike is the start of a question

  1. gateway
  2. chat.completion
  3. datastore.query
  4. model.generate

What a metric is here

A row in a column store rather than a series in a store of its own.

One store, not four

01 / 06

Metrics go where the logs and traces already are — Hanzo Datastore, a column store. Nothing to run beside it and nothing to keep in sync with it.

PromQL, or the builder

02 / 06

Bring the PromQL you already wrote, or assemble the query in the UI without learning it. Both compile to the same thing.

Labels you would not dare add

03 / 06

Per-model, per-route, per-tenant. A column store counts distinct values for a living, so a label that would multiply series in a time-series database is just another column here.

In a time-series database
series = models
Here
1 more column

The number leads somewhere

04 / 06

A spike on a chart is the start of a question, not the end. Click it and you are in the traces for that window, because they were never in a different system.

Alerts are saved queries

05 / 06

You write the query, look at it, then keep it as a rule. What pages you is something you have already seen return the answer you expected.

Scoped to your org

06 / 06

Every query carries the org from your token, so one deployment serves many tenants and no panel can read across them.

Hanzo Datastorealert ruletoken · org a
rate(http_requests_total[5m])
kindnamevaluemodelroutetenant
metrichttp_requests_totalzen/v1/chatorg a
tracechat.completionzen/v1/chatorg a
logrequest servedzen/v1/chatorg a
metrichttp_requests_totalkai/v1/embedorg b
traceembedkai/v1/embedorg b
metrichttp_requests_totalenso/v1/searchorg c
logrequest servedenso/v1/searchorg c

Send a metric, then follow it

Paste and ship

Paste this into any agent. It reads the skill manifest and calls Metrics from there.

Agent promptapi/v1/event/insights
Read https://hanzo.ai/skill.md and use Hanzo Metrics in my project. Start with: hanzo metrics query

The service the session above is changing.

traces for that window · gateway

  1. gateway
  2. chat.completion
  3. datastore.query
  4. model.generate
api.hanzo.ai/v1/event/insightsOpen in the console ↗

Example project. Every name in it is one you would give your own.

Get Metrics

Time-series metrics