Mastra Blog·· 18 hr agoAI score36
Introducing Custom Metrics for Mastra Observability
Introducing Custom Metrics for Mastra Observability
AI summary
Mastra now lets you emit custom metrics from tools, workflows, processors, scorers, or anywhere else via metrics.emit(), passing a name, value, and optional labels, cost details, or metadata, alongside its automatic duration, token, and cost metrics. Custom metrics work on the Mastra platform with MastraPlatformExporter and on self-hosted projects with MastraStorageExporter plus a ClickHouse, DuckDB, or PostgreSQL observability store, and can be queried through the Client SDK, CLI, or observability endpoints. The feature requires @mastra/[email protected] or later.
Source: Mastra Blog · mastra.ai