Skip to content

feat(js): Update docs for vercelAiIntegration #14168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 1, 2025
Merged

feat(js): Update docs for vercelAiIntegration #14168

merged 5 commits into from
Jul 1, 2025

Conversation

mydea
Copy link
Member

@mydea mydea commented Jun 26, 2025

This updates the integration docs for vercelAiIntegration:

  1. Adds proper docs for next.js, cloudflare - this is waiting on the next release!
  2. Ensure it is added on overview pages as well.

@mydea mydea requested review from AbhiPrasad and andreiborza June 26, 2025 14:40
@mydea mydea self-assigned this Jun 26, 2025
Copy link

vercel bot commented Jun 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 11:08am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jul 1, 2025 11:08am

Copy link

codecov bot commented Jun 26, 2025

Bundle Report

Changes will increase total bundle size by 859.88kB (4.07%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 11.8MB 859.88kB (7.86%) ⬆️
sentry-docs-client-array-push 9.8MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 873.24kB -0.0%
static/chunks/7750-*.js -3 bytes 415.85kB -0.0%
static/AIiA6SUzNKyqvkQUlxtfX/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/AIiA6SUzNKyqvkQUlxtfX/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/5eoELqmEKgStCV6gBaZeB/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/5eoELqmEKgStCV6gBaZeB/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.64MB -0.0%
../instrumentation.js -3 bytes 973.36kB -0.0%
9523.js -3 bytes 949.31kB -0.0%
../app/[[...path]]/page.js.nft.json 286.63kB 690.91kB 70.9% ⚠️
../app/platform-redirect/page.js.nft.json 286.63kB 690.83kB 70.91% ⚠️
../app/sitemap.xml/route.js.nft.json 286.63kB 688.8kB 71.27% ⚠️

Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

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

Could you also please add Cloudflare to docs/product/insights/getting-started.mdx b/docs/product/insights/getting-started.mdx

@@ -27,26 +28,42 @@ supported:

<Alert>

This integration only works in the Node.js and Bun runtimes. Requires SDK version `9.30.0` or higher.
This integration only works in the Node.js, Cloudflare Workers, Vercel Edge Functions and Bun runtimes. Requires SDK version `9.30.0` or higher.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This integration only works in the Node.js, Cloudflare Workers, Vercel Edge Functions and Bun runtimes. Requires SDK version `9.30.0` or higher.
This integration only works in the Node.js, Cloudflare Workers, Vercel Edge Functions and Bun runtimes. Requires SDK version `9.33.0` or higher.

Should we bump this?

@mydea mydea force-pushed the fn/vercelAiDocs branch from caca088 to f0e9876 Compare June 30, 2025 11:14

</PlatformSection>

<PlatformSection supported={['javascript.cloudflare', 'javascript.nextjs']}>
To correctly capture spans, pass the `experimental_telemetry` object with `isEnabled: true` to every `generateText`, `generateObject`, and `streamText` function call. For more details, see the [AI SDK Telemetry Metadata docs](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry#telemetry-metadata).
Copy link
Member

Choose a reason for hiding this comment

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

Should we also call out recordInputs and recordOutputs in the copy?

@@ -39,10 +40,15 @@ This integration only works in the Node.js and Bun runtimes. Requires SDK versio

_Import name: `Sentry.vercelAIIntegration`_

The `vercelAIIntegration` adds instrumentation for the [`ai`](https://www.npmjs.com/package/ai) SDK by Vercel to capture spans using the [`AI SDK's built-in Telemetry`](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry). Get started with the following snippet:
The `vercelAIIntegration` adds instrumentation for the [`ai`](https://www.npmjs.com/package/ai) SDK by Vercel to capture spans using the [`AI SDK's built-in Telemetry`](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).
Copy link
Member

Choose a reason for hiding this comment

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

You can now remove <Include name="nextjs-server-only" /> a bit earlier in this file.
CleanShot 2025-06-30 at 17 15 31

@mydea mydea merged commit 0e28b54 into master Jul 1, 2025
13 checks passed
@mydea mydea deleted the fn/vercelAiDocs branch July 1, 2025 11:13
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.

3 participants