Mastra 平台推出自定义仪表盘功能
Introducing Custom Dashboards for the Mastra Platform
Mastra 平台现支持构建自定义仪表盘,将原始可观测性数据转化为清晰洞察,提供针对 AI 应用的关键指标聚焦视图。用户可从预设模板快速启动并定制,支持线图、堆叠条形图、KPI 或评分卡展示,并可将仪表盘组件链接至底层追踪、跨时段对比或定义可观测性警报,需安装最新核心与可观测性包 @mastra/[email protected] 或更高版本。
You can now build custom dashboards on the Mastra platform — turning raw observability data into clear insights with a focused view of the metrics driving your AI applications.
Different metrics matter at different times — and for different teams. Debugging a regression could start with latency percentiles and tool error rates, while a cost review would focus on model spend and token usage. A custom dashboard lets you surface the signals that matter the most, in one focused view — made for the people who need it.
The Mastra platform's default dashboard is our recommended starting point, giving you a general overview of your application's status and health, but our users wanted more control. We shipped custom dashboards so teams can build more relevant, targeted views that surface key operational data. You can start from a predefined template to get up and running quickly, then customize it to suit your needs. Combined with custom metrics, you can emit and visualize your own measurements for tools, workflows, processors, scorers, and more.
Custom dashboards let you present data as line charts, stacked bar charts, KPIs, or a scores card, with data tables coming soon. Dashboard widgets can link to underlying traces, compare time periods, or become the measure used to define observability alerts.
Get started
Install the latest Mastra core and observability packages:
npm install @mastra/core@latest @mastra/observability@latestnote
Requires @mastra/[email protected] or later, added in PR #28714.
Add MastraPlatformExporter to your main Mastra instance and start sending observability data to the Mastra platform:
export const mastra = new Mastra({
// ...
observability: new Observability({
configs: {
default: {
// ...
exporters: [new MastraPlatformExporter()]
}
}
})
});Templates
Start a widget from a ready-made template for runs, errors, latency, cost, or tokens:
Queries
Each widget is built from queries, where you pick measures, add conditions, and group results by entity type:
For more information and full configuration options, see:
来源: Mastra Blog · mastra.ai