Skip to content

Add mastra auto-instrumentation#1901

Open
Stephen Belanger (Qard) wants to merge 5 commits intomainfrom
mastra-auto-instrumentation
Open

Add mastra auto-instrumentation#1901
Stephen Belanger (Qard) wants to merge 5 commits intomainfrom
mastra-auto-instrumentation

Conversation

@Qard
Copy link
Copy Markdown
Contributor

Fixes #1890

Summary

  • add Mastra auto-instrumentation configs and wire them into the hook, bundler plugin, webpack loader, and public exports
  • add Mastra tracing channels and a runtime plugin for agent, tool, workflow run, and workflow step spans with current-span context binding
  • add focused Mastra tests and an e2e scenario covering agent generate/stream, Tool.execute, workflow runs, and workflow-step tool nesting

Testing

  • pnpm --dir js exec vitest run src/auto-instrumentations/configs/mastra.test.ts src/instrumentation/plugins/mastra-plugin.test.ts src/instrumentation/registry.test.ts
  • pnpm run test:e2e -- mastra-instrumentation

Notes

  • pnpm --dir js test -- mastra and pnpm --dir js test -- auto-instrumentations still hit unrelated existing network-dependent failures in src/framework.test.ts and src/logger-misc.test.ts
  • pnpm run formatting still reports pre-existing unformatted fixture files under js/tests/auto-instrumentations/fixtures/test-files/

Copy link
Copy Markdown
Member

@lforst Luca Forstner (lforst) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add the mastra e2e test scenario to the ci summary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add automatic instrumentation for Mastra

2 participants