LangWatch
LangWatchは、LLMアプリケーション向けの専門的な可観測性プラットフォームです。
設定
MastraでLangWatchを使用するには、以下の環境変数を設定してください:
LANGWATCH_API_KEY=your_api_key
実装
MastraでLangWatchを使用するための設定方法は以下の通りです:
import { Mastra } from "@mastra/core";
import { LangWatchExporter } from "langwatch";
export const mastra = new Mastra({
// ... other config
telemetry: {
serviceName: "ai", // this must be set to "ai" so that the LangWatchExporter thinks it's an AI SDK trace
enabled: true,
export: {
type: "custom",
exporter: new LangWatchExporter({
apiKey: process.env.LANGWATCH_API_KEY
}),
},
},
});
ダッシュボード
app.langwatch.ai でLangWatchダッシュボードにアクセスしてください