Skip to content

Commit b4eea2a

Browse files
andreiborzaclaude
andauthored
test(node): Use a separate instrument file for the Vercel AI evaluate privacy test (#24742)
## What The Vercel AI evaluate privacy test now uses its own instrument file to turn off recording, instead of an environment variable. ## Why This follows how the other suites set up different SDK options. Follow-up to #24694. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 04fa17a commit b4eea2a

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import * as Sentry from '@sentry/node';
2+
import { loggingTransport } from '@sentry-internal/node-integration-tests';
3+
4+
Sentry.init({
5+
dsn: 'https://public@dsn.ingest.sentry.io/1337',
6+
release: '1.0',
7+
tracesSampleRate: 1.0,
8+
dataCollection: { genAI: { inputs: false, outputs: false } },
9+
transport: loggingTransport,
10+
});

‎dev-packages/node-integration-tests/suites/tracing/vercelai/v6_v7/instrument-evaluate.mjs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Sentry.init({
55
dsn: 'https://public@dsn.ingest.sentry.io/1337',
66
release: '1.0',
77
tracesSampleRate: 1.0,
8-
// `NO_RECORDING` turns off recording of inputs and outputs for the privacy test.
9-
dataCollection: process.env.NO_RECORDING ? { genAI: { inputs: false, outputs: false } } : {},
8+
dataCollection: {},
109
transport: loggingTransport,
1110
});

‎dev-packages/node-integration-tests/suites/tracing/vercelai/v6_v7/test.ts‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,10 +1069,21 @@ describe('Vercel AI integration experimental_evaluate', () => {
10691069
.start()
10701070
.completed();
10711071
});
1072+
},
1073+
{
1074+
additionalDependencies: {
1075+
ai: '^7.0.111',
1076+
},
1077+
},
1078+
);
10721079

1080+
createEsmTests(
1081+
__dirname,
1082+
'scenario-evaluate.mjs',
1083+
'instrument-evaluate-no-recording.mjs',
1084+
(createRunner, test) => {
10731085
test('does not record inputs or outputs when recording is off', async () => {
10741086
await createRunner()
1075-
.withEnv({ NO_RECORDING: 'true' })
10761087
.unordered()
10771088
.expect({
10781089
span: container => {

0 commit comments

Comments
 (0)