Skip to content

Commit 9000f93

Browse files
sergicalclaude
andauthored
fix(js): Fix Mastra docs link formatting and remove beta references (#17328)
## DESCRIBE YOUR PR | Before | After | |--------|--------| | <img width="686" height="193" alt="CleanShot 2026-04-14 at 09 22 05" src="https://github.com/user-attachments/assets/01533334-a5c1-4ae2-a00c-f03e34f418b6" /> | <img width="682" height="152" alt="CleanShot 2026-04-14 at 09 21 43" src="https://github.com/user-attachments/assets/8ddbcf01-013f-45de-b72c-ef2705b1f0fb" /> | Fix three issues with the Mastra Sentry Exporter documentation: - Fix broken `<PlatformLink>` rendering on the AI agent monitoring page (multi-line tag caused bullet and link text to appear on separate lines) - Remove beta alert and update `@mastra/sentry@beta` to `@mastra/sentry@latest` since [Mastra's docs](https://mastra.ai/docs/observability/tracing/exporters/sentry) no longer reference beta - Update setup examples to match current Mastra `Observability` API pattern ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): - [ ] Other deadline: - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0001a01 commit 9000f93

File tree

2 files changed

+36
-22
lines changed

2 files changed

+36
-22
lines changed

docs/platforms/javascript/common/ai-agent-monitoring/index.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,7 @@ await Sentry.startSpan(
366366

367367
If you're using an AI framework with a Sentry exporter, you can send traces to Sentry:
368368

369-
- <PlatformLink to="/ai-agent-monitoring/mastra/">
370-
Mastra Sentry Exporter
371-
</PlatformLink>
369+
- <PlatformLink to="/ai-agent-monitoring/mastra/">Mastra Sentry Exporter</PlatformLink>
372370

373371
## MCP Server Monitoring
374372

docs/platforms/javascript/common/ai-agent-monitoring/mastra.mdx

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,55 +25,71 @@ supported:
2525
- javascript.tanstackstart-react
2626
---
2727

28-
<Alert>
29-
30-
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.
31-
32-
</Alert>
33-
3428
[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.
3529

3630
## Installation
3731

3832
Install the Mastra Sentry exporter package:
3933

4034
```bash {tabTitle:npm}
41-
npm install @mastra/sentry@beta
35+
npm install @mastra/sentry@latest
4236
```
4337

4438
```bash {tabTitle:yarn}
45-
yarn add @mastra/sentry@beta
39+
yarn add @mastra/sentry@latest
4640
```
4741

4842
```bash {tabTitle:pnpm}
49-
pnpm add @mastra/sentry@beta
43+
pnpm add @mastra/sentry@latest
5044
```
5145

5246
## Configuration
5347

5448
### Zero-Config Setup
5549

56-
The Sentry exporter can automatically read configuration from environment variables:
50+
The Sentry exporter can automatically read configuration from environment variables (`SENTRY_DSN`, `SENTRY_ENVIRONMENT`, `SENTRY_RELEASE`):
5751

5852
```javascript
53+
import { Mastra } from "@mastra/core";
54+
import { Observability } from "@mastra/observability";
5955
import { SentryExporter } from "@mastra/sentry";
6056

61-
// Reads from SENTRY_DSN, SENTRY_ENVIRONMENT, SENTRY_RELEASE
62-
const exporter = new SentryExporter();
57+
export const mastra = new Mastra({
58+
observability: new Observability({
59+
configs: {
60+
sentry: {
61+
serviceName: "my-service",
62+
exporters: [new SentryExporter()],
63+
},
64+
},
65+
}),
66+
});
6367
```
6468

6569
### Explicit Configuration
6670

67-
You can also configure the exporter explicitly:
71+
You can also pass configuration directly:
6872

6973
```javascript
74+
import { Mastra } from "@mastra/core";
75+
import { Observability } from "@mastra/observability";
7076
import { SentryExporter } from "@mastra/sentry";
7177

72-
const exporter = new SentryExporter({
73-
dsn: process.env.SENTRY_DSN,
74-
environment: "production",
75-
tracesSampleRate: 1.0,
76-
release: "1.0.0",
78+
export const mastra = new Mastra({
79+
observability: new Observability({
80+
configs: {
81+
sentry: {
82+
serviceName: "my-service",
83+
exporters: [
84+
new SentryExporter({
85+
dsn: process.env.SENTRY_DSN,
86+
environment: "production",
87+
tracesSampleRate: 1.0,
88+
}),
89+
],
90+
},
91+
},
92+
}),
7793
});
7894
```
7995

@@ -178,4 +194,4 @@ For complete documentation on using Mastra with Sentry, see the [Mastra Sentry E
178194

179195
## Supported Versions
180196

181-
- `@mastra/sentry`: `>=1.0.0-beta.2`
197+
- `@mastra/sentry`: `>=1.0.0`

0 commit comments

Comments
 (0)