Skip to content

Commit 6e359aa

Browse files
RulaKhaledcleptric
andauthored
docs(js): Fix Vercel AI integration 404 and simplify AI Agents docs (#14755)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR - Fix /configuration/integrations/vercelai/ 404 and set supported sdks - Simplify AI Agents manual instrumentation: example-first; specs in Expandables; added OpenAI link. - Update compatibility with Vercel AI SDK v5 (ai >=3 <6). ## 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.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [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) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/) --------- Co-authored-by: Michael Hoffmann <[email protected]>
1 parent 894227a commit 6e359aa

File tree

4 files changed

+48
-15
lines changed

4 files changed

+48
-15
lines changed

docs/platforms/javascript/common/configuration/integrations/vercelai.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,4 @@ const result = await generateText({
198198

199199
## Supported Versions
200200

201-
- `ai`: `>=3.0.0 <5`
201+
- `ai`: `>=3.0.0 <6`

docs/platforms/javascript/common/tracing/instrumentation/ai-agents-module.mdx

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22
title: Instrument AI Agents
33
sidebar_order: 500
44
description: "Learn how to manually instrument your code to use Sentry's Agents module."
5+
supported:
6+
- javascript.node
7+
- javascript.aws-lambda
8+
- javascript.azure-functions
9+
- javascript.connect
10+
- javascript.express
11+
- javascript.fastify
12+
- javascript.gcp-functions
13+
- javascript.hapi
14+
- javascript.hono
15+
- javascript.koa
16+
- javascript.nestjs
17+
- javascript.bun
18+
- javascript.deno
19+
- javascript.nextjs
20+
- javascript.nuxt
21+
- javascript.astro
22+
- javascript.solidstart
23+
- javascript.sveltekit
24+
- javascript.remix
25+
- javascript.cloudflare
26+
- javascript.tanstackstart-react
527
---
628

729
With <Link to="/product/insights/ai/agents/dashboard/">Sentry AI Agent Monitoring</Link>, you can monitor and debug your AI systems with full-stack context. You'll be able to track key insights like token usage, latency, tool usage, and error rates. AI Agent Monitoring data will be fully connected to your other Sentry data like logs, errors, and traces.
@@ -12,9 +34,8 @@ As a prerequisite to setting up AI Agent Monitoring with JavaScript, you'll need
1234

1335
The JavaScript SDK supports automatic instrumentation for some AI libraries. We recommend adding their integrations to your Sentry configuration to automatically capture spans for AI agents.
1436

15-
- <PlatformLink to="/configuration/integrations/vercelai/">
16-
Vercel AI SDK
17-
</PlatformLink>
37+
- <PlatformLink to="/configuration/integrations/vercelai/">Vercel AI SDK</PlatformLink>
38+
- <PlatformLink to="/configuration/integrations/openai/">OpenAI</PlatformLink>
1839

1940
## Manual Instrumentation
2041

@@ -24,7 +45,9 @@ If you're using a library that Sentry does not automatically instrument, you can
2445

2546
### Invoke Agent Span
2647

27-
<Include name="tracing/ai-agents-module/invoke-agent-span" />
48+
<Expandable title="Invoke Agent span attributes">
49+
<Include name="tracing/ai-agents-module/invoke-agent-span" />
50+
</Expandable>
2851

2952
#### Example of an Invoke Agent Span:
3053

@@ -78,7 +101,9 @@ Sentry.startSpan(
78101

79102
### AI Client Span
80103

81-
<Include name="tracing/ai-agents-module/ai-client-span" />
104+
<Expandable title="AI Client span attributes">
105+
<Include name="tracing/ai-agents-module/ai-client-span" />
106+
</Expandable>
82107

83108
#### Example AI Client Span
84109

@@ -152,7 +177,9 @@ Sentry.startSpan(
152177

153178
### Execute Tool Span
154179

155-
<Include name="tracing/ai-agents-module/execute-tool-span" />
180+
<Expandable title="Execute Tool span attributes">
181+
<Include name="tracing/ai-agents-module/execute-tool-span" />
182+
</Expandable>
156183

157184
#### Example Execute Tool Span
158185

@@ -216,7 +243,9 @@ if (result.toolCalls && result.toolCalls.length > 0) {
216243

217244
### Handoff Span
218245

219-
<Include name="tracing/ai-agents-module/handoff-span" />
246+
<Expandable title="Handoff span attributes">
247+
<Include name="tracing/ai-agents-module/handoff-span" />
248+
</Expandable>
220249

221250
#### Example of a Handoff Span
222251

@@ -278,6 +307,6 @@ if (result.handoffTo) {
278307
}
279308
```
280309

281-
## Common Span Attributes
282-
283-
<Include name="tracing/ai-agents-module/common-span-attributes" />
310+
<Expandable title="Common span attributes">
311+
<Include name="tracing/ai-agents-module/common-span-attributes" />
312+
</Expandable>

docs/product/insights/ai/agents/getting-started.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@ import * as Sentry from "@sentry/node";
125125
// Sentry init needs to be above everything else
126126
Sentry.init({
127127
tracesSampleRate: 1.0,
128-
integrations: [
129-
Sentry.vercelAIIntegration(),
130-
],
128+
integrations: [Sentry.vercelAIIntegration()],
131129
});
132130

133131
import { generateText } from "ai";
@@ -152,7 +150,7 @@ async function aiAgent(userQuery) {
152150

153151
<Alert title="Don't see your SDK?">
154152

155-
We'll be adding AI agent integrations continuously. Please vote on [GitHub](https://github.com/getsentry/sentry-javascript/issues/16960) which one you'd like to see next. You can also instrument AI agents manually by following our [manual instrumentation guide](/platforms/javascript/tracing/instrumentation/ai-agents-module).
153+
We'll be adding AI agent integrations continuously. Please vote on [GitHub](https://github.com/getsentry/sentry-javascript/issues/16960) which one you'd like to see next. You can also instrument AI agents manually by following our [manual instrumentation guide](/platforms/javascript/guides/node/tracing/instrumentation/ai-agents-module).
156154

157155
</Alert>
158156

src/components/docPage/type.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@
189189
padding: 0.75rem;
190190
vertical-align: top;
191191
}
192+
193+
// Ensure long inline code and links wrap inside table cells
194+
code,
195+
a {
196+
word-break: break-word;
197+
}
192198
}
193199

194200
dt + dd {

0 commit comments

Comments
 (0)