docs(javascript): promote Mastra to a first-class framework guide - #19140
docs(javascript): promote Mastra to a first-class framework guide#19140sentry-junior[bot] wants to merge 4 commits into
Conversation
Move Mastra out of configuration/integrations under host frameworks into /platforms/javascript/guides/mastra/. Keep setup on @mastra/sentry, link host SDK guides for adapters/embed cases, and redirect old URLs. Co-Authored-By: David Cramer <david@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Match the Elysia/Nitro/Effect guide shell: StepConnector, SplitLayout, Install/Configure/Verify/Next Steps, Title Case headings, and DSN placeholder. Keep adapter notes as linked callouts. Co-Authored-By: David Cramer <david@sentry.io>
|
Please update the IS YOUR CHANGE URGENT? section of the PR description:
This information helps the Docs team prioritize your review. |
CI link check failed on privacy.mdx after the packages/replay path was removed. Point at the last commit that still hosts that migration note.
Mastra uses @mastra/sentry, so the inherited Node CJS/ESM instrument.js install tree is the wrong setup path. Match elysia/hono and exclude it. Co-Authored-By: David Cramer <david@sentry.io>
|
|
||
| Add the exporter on your Mastra instance. This is the supported path for Mastra agent tracing. | ||
|
|
||
| ### Zero-Config Setup |
There was a problem hiding this comment.
this is a weird title IMHO because it is not zero config, you still configure something (just not passing any options to it, but under zero config I'd understand "you need to do nothing")
| - [Fastify](/platforms/javascript/guides/fastify/) | ||
| - [Koa](/platforms/javascript/guides/koa/) | ||
| - [NestJS](/platforms/javascript/guides/nestjs/) | ||
| - [Elysia](/platforms/javascript/guides/elysia/) |
There was a problem hiding this comment.
should likely also have a link to general node docs I suppose for "other framework/setup"?
|
|
||
| 1. Keep `@mastra/sentry` on the Mastra instance (this guide). | ||
| 2. Set up the host framework SDK for the rest of the app, for example [Next.js](/platforms/javascript/guides/nextjs/) or [Astro](/platforms/javascript/guides/astro/). | ||
| 3. On serverless hosts, call `await exporter.flush()` before the runtime freezes if spans are missing. |
There was a problem hiding this comment.
I think this should not really be necessary, the serverless SDKs etc. (and variants, e.g. running next.js on serverless etc) should do this for you I think.
|
One thing is missing, from looking over this (can also be added in a follow up I suppose):
|
| - [NestJS](/platforms/javascript/guides/nestjs/) | ||
| - [Elysia](/platforms/javascript/guides/elysia/) | ||
|
|
||
| ### Embedded in Another App |
There was a problem hiding this comment.
Actually, after looking into this a bit more, I do not think this actually works 🤔 the mastra exporter runs it's own Sentry.init() from the node package, so this will likely not play together nicely with a next.js setup. generally, this will probably wipe away any other setup you've done (??) so as of now you can only really use this standalone, I think - but needs more testing to verify.
|
Replied on Slack, we should do this differently. Mind closing this PR? |
Mastra was buried under host-framework
configuration/integrations(e.g. Next.js), which doesn’t match how people actually run it.This adds
/platforms/javascript/guides/mastra/as the canonical guide:@mastra/sentryon the Mastra instance (standalone first)javascript.mastraas notSupportedRequested by David Cramer.
--
View Junior Session [Sentry]