Skip to content

docs(js): Move Mastra under integrations - #19045

Open
matejminar wants to merge 2 commits into
masterfrom
docs/move-mastra-to-integrations
Open

docs(js): Move Mastra under integrations#19045
matejminar wants to merge 2 commits into
masterfrom
docs/move-mastra-to-integrations

Conversation

@matejminar

@matejminar matejminar commented Aug 13, 2026

Copy link
Copy Markdown
Member

Right now, Mastra lives right under Agent Tracing making it look like it's the only thing we support.

This PR moves the Mastra exporter guide from Agent Tracing into the JavaScript integrations section, alongside Vercel AI, OpenAI, Anthropic, and the other supported AI stacks. The Agent Tracing overview now includes Mastra in its AI stack list, and existing internal links point directly to the new location.

Permanent redirects preserve the current and older Mastra page URLs, including framework-specific and Markdown export paths. Legacy URLs resolve directly to the new page without redirect chains.

Likely reason for why Mastra stood standalone is that it's technically exporter, not integration, but it's less confusing this way.

Group the Mastra exporter with the other AI stack integrations and update internal links to its new location. Preserve current and legacy page and Markdown export URLs with direct redirects that avoid redirect chains.
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview Aug 13, 2026 2:56pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Aug 13, 2026 2:56pm

Request Review

Remove the inherited explicit sidebar order so Mastra follows the integrations section's alphabetical ordering.
@matejminar
matejminar marked this pull request as ready for review August 13, 2026 14:46
Comment thread redirects.js
Comment on lines +2277 to +2287
{
source: '/platforms/javascript/guides/:guide/agent-tracing/mastra.md',
destination:
'/platforms/javascript/guides/:guide/configuration/integrations/mastra.md',
},
{
source:
'/platforms/javascript/guides/:guide/agent-tracing/mastra/:path*',
destination:
'/platforms/javascript/guides/:guide/configuration/integrations/mastra/:path*',
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: The new redirects for Mastra documentation do not handle the canonical URL with a trailing slash, /agent-tracing/mastra/, which will cause a 404 error.
Severity: MEDIUM

Suggested Fix

Add a new redirect rule to specifically handle the canonical URL with a trailing slash. For example: { source: '/platforms/javascript/agent-tracing/mastra/', destination: '/platforms/javascript/configuration/integrations/mastra/' }.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: redirects.js#L2272-L2287

Potential issue: The new redirect rules for the moved Mastra documentation page are
incomplete. While they handle paths like `/agent-tracing/mastra.md` and sub-paths like
`/agent-tracing/mastra/:path*`, they fail to redirect the canonical URL
`/platforms/javascript/agent-tracing/mastra/` (with a trailing slash). The `:path*`
wildcard pattern does not match an empty segment following a path separator.
Consequently, users accessing the old canonical URL via bookmarks or search engine
results will encounter a 404 error instead of being redirected to the new location at
`/platforms/javascript/configuration/integrations/mastra/`.

Also affects:

  • redirects.js:2227~2247
  • redirects.js:2248~2268

Did we get this right? 👍 / 👎 to inform future reviews.

@matejminar
matejminar requested review from a team and sfanahata August 13, 2026 14:49
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.

2 participants