Skip to main content

Dashboards

Dashboards chart your Observability data on the "Dashboards" page. Your organization has a Dashboards page, and so does each project, and each of these pages shows a default dashboard with a general overview of your application's health.

In addition to the default dashboard, you can create custom dashboards for the views your team needs, such as a debugging dashboard with latency and tool errors or a cost dashboard with model spend and token usage.

Dashboards are shared with your whole organization. Everyone sees the same dashboards, and when you change one, the change is saved for everyone.

Before you begin
Direct link to Before you begin

  • Send traces to Mastra Platform Observability, because dashboards only chart data your application has sent.
  • To create or change dashboards, you must be an organization member or admin. Viewers can look at dashboards but can't change them.

Organization and project dashboards
Direct link to Organization and project dashboards

The organization's Dashboards page and each project's Dashboards page have their own dashboards:

  • Dashboards on the organization's page show data from all projects.
  • Dashboards on a project's page show data from that project only.

You can add, change, and remove the widgets on a default dashboard, but you can't rename or delete the dashboard itself. Each page keeps its own default dashboard, which means that changing the organization's default dashboard doesn't change the one in any project.

To see an organization dashboard for a single project, choose the project in the filter bar. The dashboard is read-only in this view because it still belongs to the whole organization, not to the project you picked.

Build a widget
Direct link to Build a widget

To add a widget, start with an empty widget or pick a template, and then adjust it to fit your needs. You can show your data as a chart, KPIs, or a scores card, and the editor previews the widget as you change it.

The editor is organized into views at the top, the Data and Card metadata & actions sections on the left, and the settings of whatever you select on the right.

Views
Direct link to Views

A widget can hold several views, which appear as tabs on the dashboard. Select "Add view" to add one. Each view has its own data, which lets one widget show related data side by side, for example agent runs, tool calls, and workflow runs on separate tabs.

Data
Direct link to Data

The Data section lists the queries that fetch the widget's data and, under each query, what the widget draws from it, such as a chart series or a KPI. Add a query with the + next to Data, and add something to draw from it with the + on the query.

Each query reads from one source. In its settings, you pick what to measure, such as a count or a duration, add conditions to filter the data, and group the results, for example by agent, tool, or model.

SourceReads
TracesOne item per request, such as an agent run or a workflow run
SpansEvery step inside a request, such as model calls, tool calls, and workflow steps
ScoresResults from your scorers
Custom metricsMeasurements your application records, for example from tools, workflows, or processors

Custom metrics and scores queries also have a Request setting that decides what the query returns: one total for the whole time range, a value over time, a value per group, or, for custom metrics, percentiles such as P95.

Traces and spans can disagree on errors. When an agent recovers from a failed tool call, for example, the span for that tool call fails while the trace as a whole succeeds. See Choose what to watch for when to use each.

A series or KPI can show a query's value directly, or combine several values in a formula. An error rate, for example, is the ratio of a query that counts failed runs to a query that counts all runs. Formulas refer to queries by their Id, and they can add, subtract, and divide values or pick the largest value or the first one that's available.

Card metadata & actions
Direct link to Card metadata & actions

This section holds settings for the widget as a whole. For a chart, Total adds a single number for the whole time range next to the chart, such as the sum of every series.

Under Actions, you can let a widget open the Traces, Spans, Logs, or Threads page, filtered to the data the widget shows. You can add an "Open in…" button to the widget, or open the page when someone selects a bar or point, which also filters it to that group and time. Set this up when you build the widget, because whoever spots a spike later can then go straight to its cause.

Compare with the previous period
Direct link to Compare with the previous period

For KPIs, the "Compare with the previous period" switch above the preview compares the selected time range with the period of the same length right before it. If you select the last 7 days, for example, the widget compares them with the 7 days before that and shows the change next to each value, which helps a sudden drop or jump stand out.

Filters and time range
Direct link to Filters and time range

The time range, project, and filters at the top of the page apply to every widget on the dashboard, in addition to each widget's own filters. If a widget only shows agent A and you filter the page to agent B, the widget shows no data because no run matches both filters.

Filters aren't saved with the dashboard, which means each person picks their own. Because your filters are part of the page's URL, you can send a teammate the link to show them exactly what you're seeing. To keep the same filters for your next visit, open the filter menu and select "Save filters for next time", which stores them in your browser.

On the organization's Dashboards page, some widgets that read spans can show at most 14 days, and while a dashboard has one of them, the page offers no range longer than 14 days. Queries that count agent runs or tool calls can go beyond 14 days, while queries over other span types, such as model calls, can't. A run or tool-call query can still be limited, depending on the fields it filters or groups by. To chart a longer range, choose a project or read traces instead of spans. This is also why the cost and token templates read traces.

Edit with your team
Direct link to Edit with your team

Changes to the dashboard itself, such as adding, moving, or removing widgets, are saved as you make them, and everyone sees them right away. Changes inside the widget editor are different, because they're only saved when you select "Save" or "Add widget", so if you leave the editor before that, your changes aren't saved. Keep the following in mind when you edit a shared dashboard:

  • If two people change the same dashboard at the same moment, the change that's saved last replaces the other one.
  • Removing a widget removes it for everyone, and you can't undo it.
  • Deleting a dashboard deletes it for everyone.

If you want to try a larger change without disturbing your team, create a new dashboard for it first.

Create an alert from a widget
Direct link to Create an alert from a widget

A dashboard only shows a problem while someone is looking at it. To get notified instead, select "Create alert" on a widget. Mastra then opens the alert form with the widget's query and the dashboard's filters already filled in, and you pick a threshold and save the alert. See Alerts for how to choose a good threshold.

Only organization admins can create alerts. Because an alert watches a single value, some widgets can't be turned into one, and in that case the button tells you why. For example, a widget that shows every scorer can't become an alert.

Limits
Direct link to Limits

  • A dashboard holds up to 20 widgets.
  • Each view of a widget runs up to 8 queries.
  • Dashboard names must be unique on a page, ignoring case, and the name Metrics is reserved for the default dashboard.