From 7d5be1bc73d7a81e780cab2d22743a2c471e2689 Mon Sep 17 00:00:00 2001 From: Sergiy Dybskiy Date: Mon, 13 Apr 2026 18:01:52 -0400 Subject: [PATCH] fix(js): Fix Mastra docs link formatting and remove beta references - Fix multi-line PlatformLink that rendered as broken bullet on the AI agent monitoring page - Remove beta alert and update install commands from @beta to @latest since Mastra's own docs no longer reference beta - Update setup examples to match current Mastra Observability API - Update supported versions from >=1.0.0-beta.2 to >=1.0.0 Co-Authored-By: Claude --- .../common/ai-agent-monitoring/index.mdx | 4 +- .../common/ai-agent-monitoring/mastra.mdx | 54 ++++++++++++------- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx b/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx index fb4a2aa9ef124..d2765cd1e327c 100644 --- a/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx +++ b/docs/platforms/javascript/common/ai-agent-monitoring/index.mdx @@ -366,9 +366,7 @@ await Sentry.startSpan( If you're using an AI framework with a Sentry exporter, you can send traces to Sentry: -- - Mastra Sentry Exporter - +- Mastra Sentry Exporter ## MCP Server Monitoring diff --git a/docs/platforms/javascript/common/ai-agent-monitoring/mastra.mdx b/docs/platforms/javascript/common/ai-agent-monitoring/mastra.mdx index 15e8c4c1235ba..841a03af10129 100644 --- a/docs/platforms/javascript/common/ai-agent-monitoring/mastra.mdx +++ b/docs/platforms/javascript/common/ai-agent-monitoring/mastra.mdx @@ -25,12 +25,6 @@ supported: - javascript.tanstackstart-react --- - - -This is a server-side exporter for Mastra AI tracing that uses the Node.js Sentry SDK. It requires Node.js or compatible runtimes. Requires `@mastra/sentry@beta` package. - - - [Mastra](https://mastra.ai/) is a framework for building AI-powered applications and agents with a modern TypeScript stack. The Mastra Sentry Exporter sends tracing data to Sentry using OpenTelemetry semantic conventions, providing insights into model performance, token usage, and tool executions. ## Installation @@ -38,42 +32,64 @@ This is a server-side exporter for Mastra AI tracing that uses the Node.js Sentr Install the Mastra Sentry exporter package: ```bash {tabTitle:npm} -npm install @mastra/sentry@beta +npm install @mastra/sentry@latest ``` ```bash {tabTitle:yarn} -yarn add @mastra/sentry@beta +yarn add @mastra/sentry@latest ``` ```bash {tabTitle:pnpm} -pnpm add @mastra/sentry@beta +pnpm add @mastra/sentry@latest ``` ## Configuration ### Zero-Config Setup -The Sentry exporter can automatically read configuration from environment variables: +The Sentry exporter can automatically read configuration from environment variables (`SENTRY_DSN`, `SENTRY_ENVIRONMENT`, `SENTRY_RELEASE`): ```javascript +import { Mastra } from "@mastra/core"; +import { Observability } from "@mastra/observability"; import { SentryExporter } from "@mastra/sentry"; -// Reads from SENTRY_DSN, SENTRY_ENVIRONMENT, SENTRY_RELEASE -const exporter = new SentryExporter(); +export const mastra = new Mastra({ + observability: new Observability({ + configs: { + sentry: { + serviceName: "my-service", + exporters: [new SentryExporter()], + }, + }, + }), +}); ``` ### Explicit Configuration -You can also configure the exporter explicitly: +You can also pass configuration directly: ```javascript +import { Mastra } from "@mastra/core"; +import { Observability } from "@mastra/observability"; import { SentryExporter } from "@mastra/sentry"; -const exporter = new SentryExporter({ - dsn: process.env.SENTRY_DSN, - environment: "production", - tracesSampleRate: 1.0, - release: "1.0.0", +export const mastra = new Mastra({ + observability: new Observability({ + configs: { + sentry: { + serviceName: "my-service", + exporters: [ + new SentryExporter({ + dsn: process.env.SENTRY_DSN, + environment: "production", + tracesSampleRate: 1.0, + }), + ], + }, + }, + }), }); ``` @@ -178,4 +194,4 @@ For complete documentation on using Mastra with Sentry, see the [Mastra Sentry E ## Supported Versions -- `@mastra/sentry`: `>=1.0.0-beta.2` +- `@mastra/sentry`: `>=1.0.0`