Skip to content

Custom dashboards

Last updated: 2026-11-27T08:05:47-03:00 (UTC-3)

A dashboard is a page you build yourself: charts of the gateway’s metrics over time, single figures and notes, laid out in the order you choose. You keep it for yourself, or share it with a team or with an organization. Use one when the fixed screens do not put what you look at every day in one place: the spend of one product next to its error rate and its evaluation pass rate, for example.

A dashboard keeps no data. Every time someone opens it, the gateway answers each widget with that person’s own permissions, so sharing a dashboard never shows anyone more than the Usage and Traces screens already show them.

features:
usage_analytics: true
custom_dashboards: true # off by default

custom_dashboards needs usage_analytics and a database. It is a tenant feature: with team plans, a team role uses it only for the teams whose plan includes it. You can also turn it on from Settings → Features or with PUT /api/v1/admin/features/custom_dashboards.

Two kinds of widget need more:

To use Also turn on
Evaluation metrics (pass rate, mean score, feedback) evaluation_metrics (evaluation metrics)
Widgets over traces and spans span_store and trace_explorer (trace explorer); trace_query to write OR, NOT and groups in a widget’s query (query language)
Cost metrics usage_valuation
A breakdown or a filter by usage tag usage_tags

A widget whose source is off says so in its own place; the rest of the dashboard still loads.

  1. Open Observability → Dashboards and choose New dashboard. Give it a name and choose who it is shared with (see Share a dashboard). It opens in the builder.
  2. Choose Add widget. Pick the type, then what it reads. The Widget preview on the right shows the widget with real data as you change it; type the title and the description straight into the preview.
  3. Choose Add widget in the dialog. Use the arrows on a widget to move it earlier or later, the pencil to change it and the bin to remove it.
  4. Choose Save. Nothing is stored before that, and every save is a version.

In the builder you can also drag a widget by its title onto another to take its place, and drag its right edge to resize it; on a narrow screen, where every widget takes the full width, use the arrows and the size in the widget’s form. Leaving the builder with unsaved changes, by its own links, by the navigation rail, by signing out, by closing the tab or by going back within Dashboards, asks first.

Type What it shows Fields
Time series One metric over time, as a line chart or a bar chart, optionally broken down by one dimension Data, metric, group by, chart, interval, filters (or a query)
Single metric One figure for the whole range Data, metric, filters (or a query)
Table Several metrics side by side, one row per group: the largest groups by the first metric Data, columns (1 to 6 metrics), what a row is, how many rows (up to 50; up to 8 over traces), filters (or a query)
Markdown A note: headings (#, ##, ###), lists, **bold**, *italic*, code, fenced code and http(s) links. Anything else, HTML included, is shown as text Text, up to 4,000 characters

Every widget has a title (1 to 80 characters), an optional description (up to 300) and a size: small (a third of the page), medium (half), large (two thirds) or full. On a narrow screen every widget takes the full width.

A widget of source usage reads the usage query (GET /api/v1/admin/analytics/query): the same metrics, dimensions and filters, and the same numbers.

  • Metric: requests, errors, error rate, tokens, latency (mean, median, p95, p99), time to first byte, cost and cost per request, and, with evaluation_metrics on, evaluation results, pass rate, mean score, feedback and judge cost. The builder lists the ones this gateway offers.
  • Group by (time series): one dimension, such as model, provider, team, key, status class or tag:<name>. The chart draws the five largest groups by the widget’s metric and says how many there are in all.
  • Filters: up to 8 dimensions, each with 1 to 20 exact values and at most 94 values in all. A widget keeps the rows that match every filter.

One widget reads requests or evaluation results, never both: the dimensions of a result (evaluation, evaluator, assessment and the like) go with an evaluation metric, and pricing status goes with a metric over requests. The builder offers only what fits the metric, and a save that mixes them is refused.

  • Interval (time series): minute, hour, day, week or month. Left on Follows the range, the gateway picks the finest one that fits. A series never has more than 100 points: an interval too fine for the range is widened, and the answer says which one was used.

A time series has a point for every interval of the range. An interval without requests is 0 for a count and no value for anything else (a rate, a latency, a cost): the line shows a gap there, never a zero. A single figure follows the same rule: the p95 latency of no requests reads No data.

A widget of source traces reads the trace explorer’s chart (GET /api/v1/admin/traces/chart) for the rows a query selects.

  • Rows: traces or spans.
  • Query: the query language of the Traces screen, for example status:error model:chat*. Empty reads every row. The gateway’s own calls (judges, helpers) are left out, as the Traces screen leaves them out.
  • Metric: count, errors, duration (mean), tokens or cost. Cost is only for readers who see cost.
  • Group by (time series): status, origin, team or model; the five largest groups are drawn, and the widget says when there are more.

A widget of source experiments reads the evaluation results of experiment runs alone, which the usage source leaves out as production figures do. It takes the evaluation metrics (results, pass rate, mean score, judge cost and the rest) and any of their dimensions, with one more: Experiment run, so a table with one row per run compares runs side by side and a time series follows them. It needs evaluation_metrics.

The same dimension is in the usage query: group_by=experiment_run (or a filter on it) keeps experiment results in an evaluation query; a result of live traffic has an empty run.

A table of source usage or experiments lists up to 6 metrics, all over requests or all over evaluation results, for the largest groups by its first metric; the answer says how many groups there are in all. A table of source traces has one metric per row of status, origin, team or model, from the trace chart’s totals: up to 8 rows, the chart’s own bound.

A dashboard opens with the range you chose in the builder: the last hour, 6 hours, 24 hours, 7, 30 or 90 days. Anyone reading it can pick another range from Time range; that choice is theirs alone, goes into the page address (?range=7d) and is not saved. Days and hours start in the dashboard’s time zone (an IANA name such as America/Sao_Paulo; UTC when empty).

Shared with Who sees it What its widgets read
Only me Its owner Whatever the owner may read
A team The members of that team That team alone
An organization The members of every team of that organization The teams of that organization

A filter of the widget’s own narrows inside that: on a team’s dashboard, a widget filtered to another team shows nothing.

What “the teams of that organization” means. Every source reads an organization by one rule, the rule of the usage query’s organization dimension: a row belongs to the organization it was recorded in, and a row that records none (written before organizations were turned on) belongs to the organization its team is in now. So a team that joins the organization brings no history from its former one, and a team that leaves keeps its past numbers where they were recorded. Requests, evaluation results, traces and spans all follow it, on the database and on the analytics store, so two widgets of one dashboard always count the same organization.

In both shared cases a widget reads only as far as each reader may: a member of two of an organization’s five teams sees those two teams’ numbers on the organization’s dashboard, and a widget that needs something the reader’s role or team plan does not include says You may not read this widget instead of a number.

Who may do what follows three permissions:

Permission Lets you Who has it
dashboards:read Open the dashboards shared with you, and your own admin and viewer (every team and organization); team_admin, team_viewer and user (their teams and organizations)
dashboards:save Keep, change and remove your own dashboards The same roles, when signed in as a named user (a shared token names nobody)
dashboards:share Share with a team or an organization, and change or remove what is shared with it admin (any team or organization); an organization admin (its organization and its teams); team_admin (the teams they administer)

A shared dashboard belongs to its team or organization, not to its author: whoever holds dashboards:share there edits it, and the author keeps only the right to remove it. Only its author can make a dashboard private again. A custom role can withhold any of the three. See access control.

When organizations are in use, a team’s dashboard stays with the organization the team was in when it was shared. If the team moves to another organization, the dashboard is no longer shown to it.

Query-language widgets on shared dashboards. A widget of source traces is narrowed with a term in front of its query, which the answer’s query shows: team:"<team>" on a team’s dashboard and organization:"<organization>" on an organization’s, whatever the number of its teams (the organization field). So a widget’s query must leave room for it: one term, one level of parentheses and 280 bytes under the language’s limits, checked when you save.

A widget you want on several dashboards goes in the library: it is kept once, and dashboards link it instead of copying it. Change the library widget and every dashboard that links it shows the change at once.

  • Put a widget in the library: open it in the builder and choose Save to library. It is shared as the dashboard is (only you, the team or the organization) and the dashboard now links it. The library widget is stored at once: it stays in the library even if you then discard the dashboard’s draft.
  • Link one: Add from library in the builder lists the library widgets you see. A dashboard keeps only the link’s place and size.
  • Change one: the pencil on a linked widget edits the library widget itself, if you may edit it (the same rule as dashboards: its owner while it is private, whoever holds dashboards:share for its team or organization once it is shared).
  • Unlink: keeps a copy in the dashboard and drops the link.
  • Remove one from the library: in Add from library. Dashboards that linked it say so in the widget’s place; nothing else on them changes.

A shared dashboard shows all its readers the same widgets, so it links only what its whole audience reads: a team’s dashboard links the team’s library widgets and its organization’s; an organization’s dashboard links the organization’s; a private dashboard links anything its owner sees. A save that links anything else is refused. A link that stops holding later (the library widget was removed or made private) shows This widget’s library widget is not available. So does a link for a reader who does not see the library widget, such as the author of a team’s dashboard after leaving the team.

A person keeps up to 100 library widgets (dashboards.library_per_owner), and the gateway 10,000 in all (dashboards.library_total).

Dashboards → Built in lists dashboards the product maintains: Traffic and errors, Latency, and, when their features are on, Cost (usage_valuation), Quality (evaluation_metrics) and Traces (span_store and trace_explorer). They are read-only, have no versions, change only with the product, and read what you may read, like a private dashboard.

To change one, choose Copy: the copy is yours, private or shared with a team or an organization, and starts its own versions. Copy works on any dashboard you can open. A link to the library is kept where the copy’s audience reads that library widget; where it does not, the copy takes the widget itself; a link that no longer holds is left out.

With the chart on in Observability → Traces, Add to dashboard keeps what the chart shows (traces or spans, the query, the metric and the breakdown) as a time series widget on a dashboard you may edit, or on a new private one. The dashboard is saved at once, as a new version.

Every save is a version: the name, the description and the widgets as you saved them, with who saved it and when. Open Versions on a dashboard to:

  • View an earlier version, with its widgets answered from today’s data;
  • Restore it, which saves it again as the newest version. Where the dashboard is shared does not change.

Versions belong to the audience they were saved for. When a save changes who the dashboard is shared with (private to a team, one team to another, to an organization), the earlier versions are removed, so notes and filters written for one audience are never read by the next. The dashboard itself and its newest version are kept.

The gateway keeps the newest 50 versions of each dashboard (dashboards.versions_kept) and drops the oldest. Two people saving at once never overwrite each other: the second save is refused with version_conflict and the builder says so.

The dashboards block of the configuration file sets the limits. It is read at startup, so restart the gateway to change it; the defaults suit most installations.

dashboards:
per_owner: 50 # 1-500 dashboards one person keeps
total: 5000 # 1-100000 dashboards in all; at least per_owner
widgets_per_dashboard: 24 # 1-60 widgets on one dashboard
versions_kept: 50 # 1-500 saved versions kept of each dashboard
library_per_owner: 100 # 1-1000 library widgets one person keeps
library_total: 10000 # 1-100000 library widgets in all; at least library_per_owner
Setting Default Bounds What happens at the limit
dashboards.per_owner 50 1 to 500 A new dashboard is refused with dashboard_capacity
dashboards.total 5000 1 to 100,000, at least per_owner The same
dashboards.widgets_per_dashboard 24 1 to 60 A save with more widgets is refused; lowering it never changes stored dashboards
dashboards.versions_kept 50 1 to 500 The oldest version is dropped at the next save
dashboards.library_per_owner 100 1 to 1,000 A new library widget is refused with library_capacity
dashboards.library_total 10,000 1 to 100,000, at least library_per_owner The same

Dashboards → Limits in effect and GET /api/v1/admin/dashboards/settings show each value and whether it comes from the file or is the default.

Fixed limits: a name of 1 to 120 characters, a description of up to 500, a definition of up to 262,144 bytes, 5 series per chart, 100 points per usage series, a range of at most 90 days that does not end in the future, and 20 seconds to answer one widget.

All routes take a console session: the session cookie and, on a write, the X-CSRF-Token header. The full contract is in the API reference.

Route Does Permission
GET /api/v1/admin/dashboards Lists the dashboards you see, without their widgets, and what you may do dashboards:read
POST /api/v1/admin/dashboards Creates a dashboard (version 1) dashboards:save
GET /api/v1/admin/dashboards/{id} One dashboard with its definition dashboards:read
PUT /api/v1/admin/dashboards/{id} Saves it as a new version; the body carries the current version dashboards:save
DELETE /api/v1/admin/dashboards/{id} Removes it with its versions; version in the query is the version you read, so a dashboard someone changed meanwhile is not removed dashboards:save
GET /api/v1/admin/dashboards/{id}/versions The kept versions dashboards:read
GET /api/v1/admin/dashboards/{id}/versions/{version} One version with its definition dashboards:read
POST /api/v1/admin/dashboards/{id}/versions/{version}/restore Saves that version again as the newest dashboards:save
GET /api/v1/admin/dashboards/{id}/widgets/{widget}/data The data of one widget. range (1h to 90d), or from and to (RFC 3339), replace the dashboard’s own range; timezone its time zone; version reads the widget as a kept version had it dashboards:read
POST /api/v1/admin/dashboards/preview The data of a widget that is not saved dashboards:save
GET /api/v1/admin/dashboards/settings The limits in effect and the names a widget may use dashboards:read
POST /api/v1/admin/dashboards/{id}/copy A new dashboard from one you see, a built-in one included; the body is name and where the copy lives dashboards:save
GET /api/v1/admin/dashboard-widgets The library widgets you see dashboards:read
POST /api/v1/admin/dashboard-widgets Keeps a widget in the library; the body is widget (what it shows, without id or size) and where it lives dashboards:save
GET /api/v1/admin/dashboard-widgets/{widget} One library widget dashboards:read
PUT /api/v1/admin/dashboard-widgets/{widget} Changes it for every dashboard that links it; the body carries the current version dashboards:save
DELETE /api/v1/admin/dashboard-widgets/{widget} Removes it; version in the query is the version you read dashboards:save

The {id} of the read, copy and widget data routes is a stored dashboard (db_…) or a built-in one (dbb_traffic, dbb_cost, dbb_latency, dbb_quality, dbb_traces); a built-in dashboard takes no update, delete, version or restore. The list answers the built-in ones under builtin. A dashboard’s widget that links the library is {"id": "w_…", "library": "lw_…", "size": "…"}; reading the dashboard returns the linked library widgets under library.

Create a team dashboard with four widgets:

Terminal window
curl -sS -X POST "$GATEWAY/api/v1/admin/dashboards" \
-b cookies.txt -H "X-CSRF-Token: $CSRF" -H "Content-Type: application/json" \
-d '{
"name": "Checkout overview",
"visibility": "team",
"team": "team_checkout",
"definition": {
"schema": 1,
"range": "7d",
"timezone": "America/Sao_Paulo",
"widgets": [
{"type": "single_metric", "title": "Spend", "source": "usage", "metric": "cost_usd"},
{"type": "time_series", "title": "Errors by model", "source": "usage", "metric": "errors",
"group_by": "model", "chart": "bar", "filters": {"status_class": ["5xx"]}},
{"type": "time_series", "title": "Slow traces", "source": "traces", "metric": "count",
"scope": "traces", "query": "duration>5s"},
{"type": "markdown", "title": "Read me", "text": "# On call\nAsk **platform** first."}
]
}
}'

The answer carries the dashboard’s id and each widget’s id (assigned when you send none). Read one widget:

Terminal window
curl -sS "$GATEWAY/api/v1/admin/dashboards/$ID/widgets/$WIDGET/data?range=24h" -b cookies.txt
{
"widget": "w_3f9a1c20b7de",
"type": "time_series",
"source": "usage",
"metric": "errors",
"unit": "count",
"from": "2026-11-26T12:00:00Z",
"to": "2026-11-27T12:00:00Z",
"timezone": "America/Sao_Paulo",
"scope": {"visibility": "team", "team": "team_checkout"},
"bucket": "hour",
"group_by": "model",
"groups_total": 7,
"groups_shown": 5,
"series": [
{"key": "chat-default", "total": 41,
"points": [{"at": "2026-11-26T12:00:00Z", "value": 3}, {"at": "2026-11-26T13:00:00Z", "value": 0}]}
],
"reads": [
"/api/v1/admin/analytics/query?from=...&group_by=model&limit=5&metrics=errors&status_class=5xx&team=team_checkout&timezone=America%2FSao_Paulo&to=...",
"/api/v1/admin/analytics/query?bucket=hour&from=...&group_by=model&..."
]
}

reads lists the API calls the figure came from: call them yourself and you get the same numbers. unit says how to read a value: count, tokens, usd (an exact decimal string), ms, us (microseconds), ratio (a fraction from 0 to 1) or score. A null value means there is none: do not draw it as zero.

A widget that cannot be answered returns an error instead of data:

Status and code Meaning
403 role_forbidden, team_forbidden, entitlement_forbidden Your role, your teams or your team’s plan do not include what the widget reads
429 rate_limited Too many requests; try again shortly
409 widget_source_disabled A feature the widget’s source, metric or dimension needs is off on this gateway; the message names it
422 widget_query_refused The source refused the widget’s query for you, for example a field you may not filter on
404 library_widget_not_found The widget links a library widget that was removed, or is no longer shared with the dashboard’s audience
422 query_too_costly The query ran past its time limit; shorten the range or narrow the filters
422 widget_has_no_data A Markdown widget has no data
404 dashboard_not_found, widget_not_found The dashboard does not exist or is not shared with you; or it has no such widget

The database holds each dashboard’s name, description, definition, owner and place, its kept versions, and the library widgets (gateway_dashboards, gateway_dashboard_versions, gateway_dashboard_widgets). No request data is stored; a filter or a query can name identifiers (a key, a customer, a tag value). Creating, saving, restoring and removing a dashboard are recorded in the admin audit (Logs → Admin audit) as dashboard.create (a copy too), dashboard.update, dashboard.restore and dashboard.delete, and a library widget’s changes as dashboard_widget.create, dashboard_widget.update and dashboard_widget.delete. Removing a dashboard removes its versions.

Migrations 320 and 321 add the three tables. With custom_dashboards off nothing changes: no route answers, the console shows no Dashboards entry and no table is read. The saved analytics views of the Usage screen are a separate, older feature and are not converted.

m7gtwcontact@m7gtw.com