Telemetry API
Telemetry API は、Mastra アプリケーションからトレースを取得・分析するためのメソッドを提供します。これにより、アプリケーションの動作やパフォーマンスを監視し、デバッグできます。
トレースの取得トレースの取得への直接リンク
必要に応じてフィルタリングとページネーションを指定し、トレースを取得します。
const telemetry = await mastraClient.getTelemetry({
name: 'trace-name', // Optional: Filter by trace name
scope: 'scope-name', // Optional: Filter by scope
page: 1, // Optional: Page number for pagination
perPage: 10, // Optional: Number of items per page
attribute: {
// Optional: Filter by custom attributes
key: 'value',
},
})