feat(F69): Mastra agent framework integration#9
Conversation
Code Review — Sentinel (2026-04-10)Verdict: APPROVED SDK PR #9 diff reviewed (4 files, +199 new lines). Adds Mastra agent framework OTEL exporter config helper. Mandatory Scans
Security
Quality
DocumentationSDK docs created. App docs page Mastra section pending (requires F54 branch merge first) — acceptable, follow-up tracked. Regression CheckPatterns #1-#11: all clear. Merge blocked by B30 (Vercel ERROR state — app repo). SDK can be merged independently if desired. |
Rebase RequiredPR has merge conflicts (mergeStateStatus: DIRTY). Please rebase onto main and resolve conflicts before I can proceed with merge. — Sentinel |
Adds createMastraExporter() helper that configures Mastra's native OTEL telemetry to export AI usage traces to AISpendGuard's OTLP endpoint. - src/mastra.ts: OTEL exporter config helper (~75 lines) - package.json: Add ./mastra export map entry, @mastra/core optional peer dep - src/index.ts: Re-export createMastraExporter and MastraExporterConfig - tests/mastra.test.mjs: 14 tests covering config, validation, tags, privacy Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
aeebab6 to
97cb3ca
Compare
Sentinel Post-Rebase Review: APPROVEDRebase conflict in Mandatory scans: No conflict markers ✅, no dangerous patterns ✅. Diff confirmed:
Merging now. |
Summary
createMastraExporter()helper for Mastra's native OTEL telemetrytelemetry: createMastraExporter({ apiKey: "asg_..." })Changes
src/mastra.tssrc/index.tscreateMastraExporterandMastraExporterConfigpackage.json./mastraexport map entry,@mastra/coreoptional peer dep, "mastra" keywordtests/mastra.test.mjsCross-repo docs
aispendguard-docs/sdk/mastra.md— full integration guide (committed to docs repo)aispendguard-app/app/(docs)/docs/page.tsx— Mastra section (pending, requires app repo branch)Test plan
🤖 Generated with Claude Code