-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
ref(server-utils): Remove addVercelAiProcessors and Vercel AI OTel span processing
#23384
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
Changes from all commits
c4ef2e4
9c9824c
9e74d59
c11da54
1f0ab4b
d0177bc
8249432
34d204b
ee10119
69fe48d
640b46f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,7 +121,6 @@ export { getDefaultIntegrations } from './sdk'; | |
| export { httpServerIntegration } from './integrations/httpServer'; | ||
| export { fetchIntegration } from './integrations/fetch'; | ||
| export { spotlightIntegration } from './integrations/spotlight'; | ||
| export { vercelAIIntegration } from './integrations/tracing/vercelai'; | ||
| export { | ||
| otlpIntegration, | ||
| getOtlpTracesEndpoint, | ||
|
|
@@ -135,6 +134,7 @@ export { | |
| instrumentStateGraph, | ||
| instrumentCreateReactAgent, | ||
| } from '@sentry/server-utils'; | ||
| export { vercelAIIntegration } from '@sentry/server-utils/orchestrion'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The exported Suggested FixAdd a guard in the orchestrion version of Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That can be ignored. |
||
|
|
||
| export { instrumentWorkflowWithSentry } from './workflows'; | ||
|
|
||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1 @@ | ||
| /** | ||
| * This is a copy of the Vercel AI integration from the cloudflare SDK. | ||
| */ | ||
|
|
||
| import type { IntegrationFn } from '@sentry/core'; | ||
| import { defineIntegration, extendIntegration } from '@sentry/core'; | ||
| import { | ||
| addVercelAiProcessors, | ||
| vercelAIIntegration as serverUtilsVercelAiIntegration, | ||
| type VercelAiOptions, | ||
| } from '@sentry/server-utils'; | ||
|
|
||
| const _vercelAIIntegration = ((options: VercelAiOptions = {}) => { | ||
| const inner = serverUtilsVercelAiIntegration(options); | ||
|
|
||
| return extendIntegration(inner, { | ||
| options, | ||
| setup(client) { | ||
| addVercelAiProcessors(client); | ||
| }, | ||
| }); | ||
| }) satisfies IntegrationFn; | ||
|
|
||
| /** | ||
| * Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library. | ||
| * This integration is not enabled by default, you need to manually add it. | ||
| * | ||
| * For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry). | ||
| * | ||
| * You need to enable collecting spans for a specific call by setting | ||
| * `experimental_telemetry.isEnabled` to `true` in the first argument of the function call. | ||
| * | ||
| * ```javascript | ||
| * const result = await generateText({ | ||
| * model: openai('gpt-4-turbo'), | ||
| * experimental_telemetry: { isEnabled: true }, | ||
| * }); | ||
| * ``` | ||
| * | ||
| * If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each | ||
| * function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs` | ||
| * to `true`. | ||
| * | ||
| * ```javascript | ||
| * const result = await generateText({ | ||
| * model: openai('gpt-4-turbo'), | ||
| * experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true }, | ||
| * }); | ||
| */ | ||
| export const vercelAIIntegration = defineIntegration(_vercelAIIntegration); | ||
| export { vercelAIIntegration } from '@sentry/server-utils/orchestrion'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { defineIntegration } from '@sentry/core'; | ||
|
|
||
| /** | ||
| * Shim for the edge build so named imports from `@sentry/nextjs` stay resolvable in | ||
| * edge-compiled instrumentation modules. The real implementation ships in the server build; | ||
| * Vercel AI is not instrumented on the edge runtime. | ||
| */ | ||
| export const vercelAIIntegration = defineIntegration(() => { | ||
| return { | ||
| name: 'VercelAI', | ||
| }; | ||
| }); |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to go into
docs/migration/v11-end-state.mdI thinkThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, #23510!