Skip to content

Commit 88a4c3e

Browse files
committed
Add enableTruncation option to Cloudflare, Deno, and Vercel Edge integrations
1 parent d176053 commit 88a4c3e

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

packages/cloudflare/src/integrations/tracing/vercelai.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,18 @@ import { addVercelAiProcessors, defineIntegration } from '@sentry/core';
1313

1414
const INTEGRATION_NAME = 'VercelAI';
1515

16-
const _vercelAIIntegration = (() => {
16+
interface VercelAiOptions {
17+
/**
18+
* Enable or disable truncation of recorded input messages.
19+
* Defaults to `true`.
20+
*/
21+
enableTruncation?: boolean;
22+
}
23+
24+
const _vercelAIIntegration = ((options: VercelAiOptions = {}) => {
1725
return {
1826
name: INTEGRATION_NAME,
27+
options,
1928
setup(client) {
2029
addVercelAiProcessors(client);
2130
},

packages/deno/src/integrations/tracing/vercelai.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ import { addVercelAiProcessors, defineIntegration } from '@sentry/core';
77

88
const INTEGRATION_NAME = 'VercelAI';
99

10-
const _vercelAIIntegration = (() => {
10+
interface VercelAiOptions {
11+
/**
12+
* Enable or disable truncation of recorded input messages.
13+
* Defaults to `true`.
14+
*/
15+
enableTruncation?: boolean;
16+
}
17+
18+
const _vercelAIIntegration = ((options: VercelAiOptions = {}) => {
1119
return {
1220
name: INTEGRATION_NAME,
21+
options,
1322
setup(client) {
1423
addVercelAiProcessors(client);
1524
},

packages/vercel-edge/src/integrations/tracing/vercelai.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,18 @@ import { addVercelAiProcessors, defineIntegration } from '@sentry/core';
1313

1414
const INTEGRATION_NAME = 'VercelAI';
1515

16-
const _vercelAIIntegration = (() => {
16+
interface VercelAiOptions {
17+
/**
18+
* Enable or disable truncation of recorded input messages.
19+
* Defaults to `true`.
20+
*/
21+
enableTruncation?: boolean;
22+
}
23+
24+
const _vercelAIIntegration = ((options: VercelAiOptions = {}) => {
1725
return {
1826
name: INTEGRATION_NAME,
27+
options,
1928
setup(client) {
2029
addVercelAiProcessors(client);
2130
},

0 commit comments

Comments
 (0)