Skip to content

feat(core): Add tool calls attributes for Anthropic AI #37957

feat(core): Add tool calls attributes for Anthropic AI

feat(core): Add tool calls attributes for Anthropic AI #37957

Triggered via pull request August 28, 2025 14:57
Status Failure
Total duration 22m 40s
Artifacts 2

build.yml

on: pull_request
Get Metadata
6s
Get Metadata
Check file formatting
59s
Check file formatting
Check PR branches
2s
Check PR branches
Prepare E2E tests
2m 4s
Prepare E2E tests
Matrix: job_browser_loader_tests
Matrix: job_browser_playwright_tests
Matrix: job_node_integration_tests
Matrix: job_node_unit_tests
Matrix: job_remix_integration_tests
Lint
6m 20s
Lint
Circular Dependency Check
1m 23s
Circular Dependency Check
Upload Artifacts
0s
Upload Artifacts
Browser Unit Tests
3m 27s
Browser Unit Tests
Bun Unit Tests
46s
Bun Unit Tests
Deno Unit Tests
42s
Deno Unit Tests
Cloudflare Integration Tests
34s
Cloudflare Integration Tests
Size Check
1m 28s
Size Check
Check for faulty .d.ts files
31s
Check for faulty .d.ts files
Matrix: job_e2e_tests
Matrix: job_optional_e2e_tests
All required jobs passed or were skipped
2s
All required jobs passed or were skipped
Fit to window
Zoom out
Zoom in

Annotations

52 errors
PW loader_base Tests
Process completed with exit code 1.
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > captures error in tool: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.?","lineno":1493,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"wrapModuleLoad","lineno":238,"colno":24,"in_app":false},{"filename":"node:diagnostics_channel","module":"node:diagnostics_channel","function":"TracingChannel.traceSync","lineno":322,"colno":14,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._load","lineno":1290,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1470,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Object..js","lineno":1871,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1738,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code, then it\\'s possible it was bundled into require() automatically by your bundler. '"," + 'In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all Com {snip}",")"]},{"filename":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","module":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","function":"?","in_app":false}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"d0fc0ce3ddf64c78a320165e77438cc1","lev
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > captures error in tool: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"asyncRunEntryPointWithESMLoader","lineno":101,"colno":5,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"onImport.tracePromise.__proto__","lineno":683,"colno":26,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":371,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tconfigurable: true,"]}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"9295fe
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > creates ai related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.?","lineno":1493,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"wrapModuleLoad","lineno":238,"colno":24,"in_app":false},{"filename":"node:diagnostics_channel","module":"node:diagnostics_channel","function":"TracingChannel.traceSync","lineno":322,"colno":14,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._load","lineno":1290,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1470,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Object..js","lineno":1871,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1738,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code, then it\\'s possible it was bundled into require() automatically by your bundler. '"," + 'In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all Com {snip}",")"]},{"filename":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","module":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","function":"?","in_app":false}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"a092d1104c6b460f98f66222447d8729","lev
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > creates ai related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"asyncRunEntryPointWithESMLoader","lineno":101,"colno":5,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"onImport.tracePromise.__proto__","lineno":683,"colno":26,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":371,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tconfigurable: true,"]}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"5997b2
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > creates ai related spans with sendDefaultPii: false: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.?","lineno":1493,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"wrapModuleLoad","lineno":238,"colno":24,"in_app":false},{"filename":"node:diagnostics_channel","module":"node:diagnostics_channel","function":"TracingChannel.traceSync","lineno":322,"colno":14,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._load","lineno":1290,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1470,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Object..js","lineno":1871,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1738,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code, then it\\'s possible it was bundled into require() automatically by your bundler. '"," + 'In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all Com {snip}",")"]},{"filename":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","module":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","function":"?","in_app":false}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"3df4cbaecc904dd5b4411eeb74f6814a","lev
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > creates ai related spans with sendDefaultPii: false: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"asyncRunEntryPointWithESMLoader","lineno":101,"colno":5,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"onImport.tracePromise.__proto__","lineno":683,"colno":26,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":371,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tconfigurable: true,"]}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"4f726e
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > cjs > streams record response text when PII true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(13) } to match object { event_id: Any<String>, …(5) } (73 matching properties omitted from actual) - Expected + Received @@ -1,23 +1,60 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { - "data": ObjectContaining { + "spans": [ + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this please\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.request.stream": true, + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "bac035ed29a80636", + "span_id": "4d6294ce572a1e0d", + "start_timestamp": 1756393477.328, + "status": "ok", + "timestamp": 1756393477.3359473, + "trace_id": "532ecb802ba4eaa212ab30d41a356a46", }, - ObjectContaining { - "data": ObjectContaining { + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this too\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "bac035ed29a80636", + "span_id": "be7d5cf6bdbbeb23", + "start_timestamp": 1756393477.337, + "status": "ok", + "timestamp": 1756393477.3427203, + "trace_id": "532ecb802ba4eaa212ab30d41a356a46", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/runner.ts:611:15
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > esm > streams record response text when PII true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(13) } to match object { event_id: Any<String>, …(5) } (73 matching properties omitted from actual) - Expected + Received @@ -1,23 +1,60 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { - "data": ObjectContaining { + "spans": [ + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this please\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.request.stream": true, + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "ca67158fc8f9ef1a", + "span_id": "f62231b23ea52975", + "start_timestamp": 1756393476.818, + "status": "ok", + "timestamp": 1756393476.8247154, + "trace_id": "bb5f5b732fc17ab8d203308d9fd406c4", }, - ObjectContaining { - "data": ObjectContaining { + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this too\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "ca67158fc8f9ef1a", + "span_id": "cc4285e284244c97", + "start_timestamp": 1756393476.825, + "status": "ok", + "timestamp": 1756393476.8305056, + "trace_id": "bb5f5b732fc17ab8d203308d9fd406c4", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/runner.ts:611:15
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > cjs > creates anthropic related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) } (74 matching properties omitted from actual) - Expected + Received @@ -1,31 +1,37 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { + "spans": [ + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.max_tokens": 100, "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.request.temperature": 0.7, "gen_ai.response.id": "msg_mock123", "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.text": "Hello from Anthropic mock!", + "gen_ai.response.tool_calls": "[]", "gen_ai.system": "anthropic", "gen_ai.usage.input_tokens": 10, "gen_ai.usage.output_tokens": 15, "gen_ai.usage.total_tokens": 25, "sentry.op": "gen_ai.messages", "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "16283f93fe1a3bd8", + "span_id": "cbb45c5ce2a1f9ce", + "start_timestamp": 1756393473.386, "status": "ok", + "timestamp": 1756393473.3970265, + "trace_id": "b66694bc10864eb15dab3ff621b6f2d9", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"This will fail\"}]", "gen_ai.request.model": "error-model", "gen_ai.system": "anthropic", @@ -33,13 +39,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages error-model", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "16283f93fe1a3bd8", + "span_id": "c8ae3569f487e945", + "start_timestamp": 1756393473.397, "status": "unknown_error", + "timestamp": 1756393473.4168932, + "trace_id": "b66694bc10864eb15dab3ff621b6f2d9", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.text": "15", @@ -48,13 +59,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "16283f93fe1a3bd8", + "span_id": "d5c6cb58cda9036c", + "start_timestamp": 1756393473.417, "status": "ok", + "timestamp": 1756393473.4543767, + "trace_id": "b66694bc10864eb15dab3ff621b6f2d9", }, - ObjectContaining { + { "data": { "anthropic.response.timestamp": "2024-05-08T05:20:00.000Z", "gen_ai.operation.name": "models", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.id": "claude-3-haiku-20240307", @@ -64,11 +80,16 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "models claude-3-haiku-20240307", "op": "gen_ai.models", "origin": "auto.ai.anthropic", + "parent_span_id": "16283f93fe1a3bd8", + "span_id": "8bb64551303232aa", + "start_timestamp": 1756393473.455, "status": "ok", + "timestamp": 1756393473.4656968, + "trace_id": "b66694bc10864eb15dab3ff621b6f2d9", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > esm > creates anthropic related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) } (74 matching properties omitted from actual) - Expected + Received @@ -1,31 +1,37 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { + "spans": [ + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.max_tokens": 100, "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.request.temperature": 0.7, "gen_ai.response.id": "msg_mock123", "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.text": "Hello from Anthropic mock!", + "gen_ai.response.tool_calls": "[]", "gen_ai.system": "anthropic", "gen_ai.usage.input_tokens": 10, "gen_ai.usage.output_tokens": 15, "gen_ai.usage.total_tokens": 25, "sentry.op": "gen_ai.messages", "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "dcf40bb4fa45849a", + "span_id": "c1f56b6fdd6416e3", + "start_timestamp": 1756393472.81, "status": "ok", + "timestamp": 1756393472.8210921, + "trace_id": "fbb751ba5d365eb9bdf0c436303d91a1", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"This will fail\"}]", "gen_ai.request.model": "error-model", "gen_ai.system": "anthropic", @@ -33,13 +39,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages error-model", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "dcf40bb4fa45849a", + "span_id": "edf8eb224f245606", + "start_timestamp": 1756393472.822, "status": "unknown_error", + "timestamp": 1756393472.838186, + "trace_id": "fbb751ba5d365eb9bdf0c436303d91a1", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.text": "15", @@ -48,13 +59,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "dcf40bb4fa45849a", + "span_id": "c8ac62404b1f21fd", + "start_timestamp": 1756393472.838, "status": "ok", + "timestamp": 1756393472.860708, + "trace_id": "fbb751ba5d365eb9bdf0c436303d91a1", }, - ObjectContaining { + { "data": { "anthropic.response.timestamp": "2024-05-08T05:20:00.000Z", "gen_ai.operation.name": "models", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.id": "claude-3-haiku-20240307", @@ -64,11 +80,16 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "models claude-3-haiku-20240307", "op": "gen_ai.models", "origin": "auto.ai.anthropic", + "parent_span_id": "dcf40bb4fa45849a", + "span_id": "1b130d58b651f0a2", + "start_timestamp": 1756393472.861, "status": "ok", + "timestamp": 1756393472.8713212, + "trace_id": "fbb751ba5d365eb9bdf0c436303d91a1", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/ru
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > captures error in tool: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/dev-packages/node-integration-tests/suites/tracing/vercelai/v5/tmp_mevjb7j9_xeoqcn/node_modules/ai/dist/test/index.js","module":"ai.dist.test:index","function":"Object.?","lineno":45,"colno":21,"in_app":false,"pre_context":["","// src/test/not-implemented.ts","function notImplemented() {"," throw new Error(\"Not implemented\");","}","","// src/test/mock-embedding-model-v2.ts"],"context_line":"var import_vitest = require(\"vitest\");","post_context":["var MockEmbeddingModelV2 = class {"," constructor({"," provider = \"mock-provider\","," modelId = \"mock-model-id\","," maxEmbeddingsPerCall = 1,"," supportsParallelCalls = false,"," doEmbed = notImplemented"]},{"filename":"node:internal/modules/helpers","module":"helpers","function":"require","lineno":182,"colno":18,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.require","lineno":1298,"colno":19,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._load","lineno":1096,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1275,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._extensions..js","lineno":1613,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1529,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code,
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > captures error in tool: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"asyncRunEntryPointWithESMLoader","lineno":117,"colno":5,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"ModuleLoader.import","lineno":540,"colno":24,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":263,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tconfigurable: true,"]}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"c750d5df7dc0499083
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > creates ai related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/dev-packages/node-integration-tests/suites/tracing/vercelai/v5/tmp_mevjb7j9_4cy72q/node_modules/ai/dist/test/index.js","module":"ai.dist.test:index","function":"Object.?","lineno":45,"colno":21,"in_app":false,"pre_context":["","// src/test/not-implemented.ts","function notImplemented() {"," throw new Error(\"Not implemented\");","}","","// src/test/mock-embedding-model-v2.ts"],"context_line":"var import_vitest = require(\"vitest\");","post_context":["var MockEmbeddingModelV2 = class {"," constructor({"," provider = \"mock-provider\","," modelId = \"mock-model-id\","," maxEmbeddingsPerCall = 1,"," supportsParallelCalls = false,"," doEmbed = notImplemented"]},{"filename":"node:internal/modules/helpers","module":"helpers","function":"require","lineno":182,"colno":18,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.require","lineno":1298,"colno":19,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._load","lineno":1096,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1275,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._extensions..js","lineno":1613,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1529,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code,
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > creates ai related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"asyncRunEntryPointWithESMLoader","lineno":117,"colno":5,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"ModuleLoader.import","lineno":540,"colno":24,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":263,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tconfigurable: true,"]}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"47b28338597d4ecbb8
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > creates ai related spans with sendDefaultPii: false: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/dev-packages/node-integration-tests/suites/tracing/vercelai/v5/tmp_mevjb7j9_auz064/node_modules/ai/dist/test/index.js","module":"ai.dist.test:index","function":"Object.?","lineno":45,"colno":21,"in_app":false,"pre_context":["","// src/test/not-implemented.ts","function notImplemented() {"," throw new Error(\"Not implemented\");","}","","// src/test/mock-embedding-model-v2.ts"],"context_line":"var import_vitest = require(\"vitest\");","post_context":["var MockEmbeddingModelV2 = class {"," constructor({"," provider = \"mock-provider\","," modelId = \"mock-model-id\","," maxEmbeddingsPerCall = 1,"," supportsParallelCalls = false,"," doEmbed = notImplemented"]},{"filename":"node:internal/modules/helpers","module":"helpers","function":"require","lineno":182,"colno":18,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.require","lineno":1298,"colno":19,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._load","lineno":1096,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1275,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._extensions..js","lineno":1613,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1529,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code,
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > creates ai related spans with sendDefaultPii: false: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"asyncRunEntryPointWithESMLoader","lineno":117,"colno":5,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"ModuleLoader.import","lineno":540,"colno":24,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":263,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tconfigurable: true,"]}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"2f0c1cb458e0473cbd
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > cjs > streams record response text when PII true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(13) } to match object { event_id: Any<String>, …(5) } (73 matching properties omitted from actual) - Expected + Received @@ -1,23 +1,60 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { - "data": ObjectContaining { + "spans": [ + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this please\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.request.stream": true, + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "f14fc7b61ba5393d", + "span_id": "9de0a76311294c99", + "start_timestamp": 1756393467.245, + "status": "ok", + "timestamp": 1756393467.251061, + "trace_id": "7fc7b12abae6ebbdef8384557d314050", }, - ObjectContaining { - "data": ObjectContaining { + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this too\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "f14fc7b61ba5393d", + "span_id": "031715043ec7375b", + "start_timestamp": 1756393467.252, + "status": "ok", + "timestamp": 1756393467.2576408, + "trace_id": "7fc7b12abae6ebbdef8384557d314050", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/runner.ts:611:15
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > esm > streams record response text when PII true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(13) } to match object { event_id: Any<String>, …(5) } (73 matching properties omitted from actual) - Expected + Received @@ -1,23 +1,60 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { - "data": ObjectContaining { + "spans": [ + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this please\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.request.stream": true, + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "77d327c49051c931", + "span_id": "f158d216847834b9", + "start_timestamp": 1756393466.694, + "status": "ok", + "timestamp": 1756393466.7016325, + "trace_id": "2054e98f2f0f3d3e2fab004139c7c272", }, - ObjectContaining { - "data": ObjectContaining { + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this too\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "77d327c49051c931", + "span_id": "a2a0b9e6638fc229", + "start_timestamp": 1756393466.702, + "status": "ok", + "timestamp": 1756393466.7079632, + "trace_id": "2054e98f2f0f3d3e2fab004139c7c272", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/runner.ts:611:15
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > cjs > creates anthropic related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) } (74 matching properties omitted from actual) - Expected + Received @@ -1,31 +1,37 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { + "spans": [ + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.max_tokens": 100, "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.request.temperature": 0.7, "gen_ai.response.id": "msg_mock123", "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.text": "Hello from Anthropic mock!", + "gen_ai.response.tool_calls": "[]", "gen_ai.system": "anthropic", "gen_ai.usage.input_tokens": 10, "gen_ai.usage.output_tokens": 15, "gen_ai.usage.total_tokens": 25, "sentry.op": "gen_ai.messages", "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "c7f0619458c28511", + "span_id": "5995dac2dbb72797", + "start_timestamp": 1756393463.096, "status": "ok", + "timestamp": 1756393463.10838, + "trace_id": "712551dca9c06100e7032a7fe89b974c", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"This will fail\"}]", "gen_ai.request.model": "error-model", "gen_ai.system": "anthropic", @@ -33,13 +39,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages error-model", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "c7f0619458c28511", + "span_id": "57960d0f3e5a9cc4", + "start_timestamp": 1756393463.109, "status": "unknown_error", + "timestamp": 1756393463.1313725, + "trace_id": "712551dca9c06100e7032a7fe89b974c", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.text": "15", @@ -48,13 +59,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "c7f0619458c28511", + "span_id": "1d3e73f4fadda9bb", + "start_timestamp": 1756393463.132, "status": "ok", + "timestamp": 1756393463.1728294, + "trace_id": "712551dca9c06100e7032a7fe89b974c", }, - ObjectContaining { + { "data": { "anthropic.response.timestamp": "2024-05-08T05:20:00.000Z", "gen_ai.operation.name": "models", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.id": "claude-3-haiku-20240307", @@ -64,11 +80,16 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "models claude-3-haiku-20240307", "op": "gen_ai.models", "origin": "auto.ai.anthropic", + "parent_span_id": "c7f0619458c28511", + "span_id": "6b994aa8d841baed", + "start_timestamp": 1756393463.173, "status": "ok", + "timestamp": 1756393463.1834464, + "trace_id": "712551dca9c06100e7032a7fe89b974c", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/r
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > esm > creates anthropic related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) } (74 matching properties omitted from actual) - Expected + Received @@ -1,31 +1,37 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { + "spans": [ + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.max_tokens": 100, "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.request.temperature": 0.7, "gen_ai.response.id": "msg_mock123", "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.text": "Hello from Anthropic mock!", + "gen_ai.response.tool_calls": "[]", "gen_ai.system": "anthropic", "gen_ai.usage.input_tokens": 10, "gen_ai.usage.output_tokens": 15, "gen_ai.usage.total_tokens": 25, "sentry.op": "gen_ai.messages", "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "535f42ad46fd36e2", + "span_id": "e262f87e3c81d76d", + "start_timestamp": 1756393462.475, "status": "ok", + "timestamp": 1756393462.4860227, + "trace_id": "9d8f31101e04bd8ad1d9d4a465f0c754", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"This will fail\"}]", "gen_ai.request.model": "error-model", "gen_ai.system": "anthropic", @@ -33,13 +39,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages error-model", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "535f42ad46fd36e2", + "span_id": "763d0434197e6a7f", + "start_timestamp": 1756393462.486, "status": "unknown_error", + "timestamp": 1756393462.5021462, + "trace_id": "9d8f31101e04bd8ad1d9d4a465f0c754", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.text": "15", @@ -48,13 +59,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "535f42ad46fd36e2", + "span_id": "956f04549a9f565a", + "start_timestamp": 1756393462.503, "status": "ok", + "timestamp": 1756393462.5323186, + "trace_id": "9d8f31101e04bd8ad1d9d4a465f0c754", }, - ObjectContaining { + { "data": { "anthropic.response.timestamp": "2024-05-08T05:20:00.000Z", "gen_ai.operation.name": "models", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.id": "claude-3-haiku-20240307", @@ -64,11 +80,16 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "models claude-3-haiku-20240307", "op": "gen_ai.models", "origin": "auto.ai.anthropic", + "parent_span_id": "535f42ad46fd36e2", + "span_id": "5a94a14deabdbfad", + "start_timestamp": 1756393462.532, "status": "ok", + "timestamp": 1756393462.5423963, + "trace_id": "9d8f31101e04bd8ad1d9d4a465f0c754", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > captures error in tool: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.?","lineno":1445,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"wrapModuleLoad","lineno":235,"colno":24,"in_app":false},{"filename":"node:diagnostics_channel","module":"node:diagnostics_channel","function":"TracingChannel.traceSync","lineno":322,"colno":14,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Function._load","lineno":1246,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1423,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Object..js","lineno":1820,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1688,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code, then it\\'s possible it was bundled into require() automatically by your bundler. '"," + 'In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all Com {snip}",")"]},{"filename":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","module":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","function":"?","in_app":false}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"5a7a08b1777c405dadb817331412630b","l
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > captures error in tool: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"asyncRunEntryPointWithESMLoader","lineno":117,"colno":5,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"onImport.tracePromise.__proto__","lineno":647,"colno":26,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":343,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tconfigurable: true,"]}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"8b1499
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > creates ai related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.?","lineno":1445,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"wrapModuleLoad","lineno":235,"colno":24,"in_app":false},{"filename":"node:diagnostics_channel","module":"node:diagnostics_channel","function":"TracingChannel.traceSync","lineno":322,"colno":14,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Function._load","lineno":1246,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1423,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Object..js","lineno":1820,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1688,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code, then it\\'s possible it was bundled into require() automatically by your bundler. '"," + 'In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all Com {snip}",")"]},{"filename":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","module":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","function":"?","in_app":false}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"c932212a3b674535a0ff365c04434701","l
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > creates ai related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"asyncRunEntryPointWithESMLoader","lineno":117,"colno":5,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"onImport.tracePromise.__proto__","lineno":647,"colno":26,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":343,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tconfigurable: true,"]}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"c2c7c3
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > creates ai related spans with sendDefaultPii: false: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.?","lineno":1445,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"wrapModuleLoad","lineno":235,"colno":24,"in_app":false},{"filename":"node:diagnostics_channel","module":"node:diagnostics_channel","function":"TracingChannel.traceSync","lineno":322,"colno":14,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Function._load","lineno":1246,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1423,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Object..js","lineno":1820,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1688,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code, then it\\'s possible it was bundled into require() automatically by your bundler. '"," + 'In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all Com {snip}",")"]},{"filename":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","module":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","function":"?","in_app":false}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"9f2b0031c84f470db272deabbe75d220","l
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > creates ai related spans with sendDefaultPii: false: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"asyncRunEntryPointWithESMLoader","lineno":117,"colno":5,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"onImport.tracePromise.__proto__","lineno":647,"colno":26,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":343,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tconfigurable: true,"]}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"3ff30d
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > cjs > streams record response text when PII true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(13) } to match object { event_id: Any<String>, …(5) } (73 matching properties omitted from actual) - Expected + Received @@ -1,23 +1,60 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { - "data": ObjectContaining { + "spans": [ + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this please\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.request.stream": true, + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "9f209d50a1e0dfc4", + "span_id": "fb590cafd513ac04", + "start_timestamp": 1756393473.75, + "status": "ok", + "timestamp": 1756393473.7570066, + "trace_id": "ac1e1f250fb2de04cd8f2cdc5744af2a", }, - ObjectContaining { - "data": ObjectContaining { + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this too\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "9f209d50a1e0dfc4", + "span_id": "855d65e01160c668", + "start_timestamp": 1756393473.758, + "status": "ok", + "timestamp": 1756393473.7636094, + "trace_id": "ac1e1f250fb2de04cd8f2cdc5744af2a", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/runner.ts:611:15
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > esm > streams record response text when PII true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(13) } to match object { event_id: Any<String>, …(5) } (73 matching properties omitted from actual) - Expected + Received @@ -1,23 +1,60 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { - "data": ObjectContaining { + "spans": [ + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this please\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.request.stream": true, + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "51d891174965918f", + "span_id": "5e5401c3ae580384", + "start_timestamp": 1756393473.244, + "status": "ok", + "timestamp": 1756393473.2508974, + "trace_id": "6418f8f9c21c97de6212778813018f66", }, - ObjectContaining { - "data": ObjectContaining { + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this too\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "51d891174965918f", + "span_id": "c7a8b823bc2dfa07", + "start_timestamp": 1756393473.252, + "status": "ok", + "timestamp": 1756393473.2576118, + "trace_id": "6418f8f9c21c97de6212778813018f66", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/runner.ts:611:15
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > cjs > creates anthropic related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) } (74 matching properties omitted from actual) - Expected + Received @@ -1,31 +1,37 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { + "spans": [ + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.max_tokens": 100, "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.request.temperature": 0.7, "gen_ai.response.id": "msg_mock123", "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.text": "Hello from Anthropic mock!", + "gen_ai.response.tool_calls": "[]", "gen_ai.system": "anthropic", "gen_ai.usage.input_tokens": 10, "gen_ai.usage.output_tokens": 15, "gen_ai.usage.total_tokens": 25, "sentry.op": "gen_ai.messages", "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "6ab91b1da4047a29", + "span_id": "7e2f66ec7eaf4794", + "start_timestamp": 1756393469.953, "status": "ok", + "timestamp": 1756393469.9636035, + "trace_id": "e6c87c50f8cd7f74ce7007a05d8a1ed6", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"This will fail\"}]", "gen_ai.request.model": "error-model", "gen_ai.system": "anthropic", @@ -33,13 +39,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages error-model", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "6ab91b1da4047a29", + "span_id": "c6852a1134b15685", + "start_timestamp": 1756393469.964, "status": "unknown_error", + "timestamp": 1756393469.984383, + "trace_id": "e6c87c50f8cd7f74ce7007a05d8a1ed6", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.text": "15", @@ -48,13 +59,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "6ab91b1da4047a29", + "span_id": "7ced6db9cd304d49", + "start_timestamp": 1756393469.984, "status": "ok", + "timestamp": 1756393470.0222552, + "trace_id": "e6c87c50f8cd7f74ce7007a05d8a1ed6", }, - ObjectContaining { + { "data": { "anthropic.response.timestamp": "2024-05-08T05:20:00.000Z", "gen_ai.operation.name": "models", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.id": "claude-3-haiku-20240307", @@ -64,11 +80,16 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "models claude-3-haiku-20240307", "op": "gen_ai.models", "origin": "auto.ai.anthropic", + "parent_span_id": "6ab91b1da4047a29", + "span_id": "a6aeba7f1ffcbfda", + "start_timestamp": 1756393470.023, "status": "ok", + "timestamp": 1756393470.0325584, + "trace_id": "e6c87c50f8cd7f74ce7007a05d8a1ed6", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > esm > creates anthropic related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) } (74 matching properties omitted from actual) - Expected + Received @@ -1,31 +1,37 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { + "spans": [ + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.max_tokens": 100, "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.request.temperature": 0.7, "gen_ai.response.id": "msg_mock123", "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.text": "Hello from Anthropic mock!", + "gen_ai.response.tool_calls": "[]", "gen_ai.system": "anthropic", "gen_ai.usage.input_tokens": 10, "gen_ai.usage.output_tokens": 15, "gen_ai.usage.total_tokens": 25, "sentry.op": "gen_ai.messages", "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "a73122fe2ffeaa43", + "span_id": "4247fd49fb9e7f5c", + "start_timestamp": 1756393469.283, "status": "ok", + "timestamp": 1756393469.294784, + "trace_id": "2b7833479bca2f3e76330b8dd7b7dc74", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"This will fail\"}]", "gen_ai.request.model": "error-model", "gen_ai.system": "anthropic", @@ -33,13 +39,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages error-model", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "a73122fe2ffeaa43", + "span_id": "a45b6f66e0c7fb50", + "start_timestamp": 1756393469.296, "status": "unknown_error", + "timestamp": 1756393469.3143425, + "trace_id": "2b7833479bca2f3e76330b8dd7b7dc74", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.text": "15", @@ -48,13 +59,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "a73122fe2ffeaa43", + "span_id": "df25405dbcb2314d", + "start_timestamp": 1756393469.314, "status": "ok", + "timestamp": 1756393469.3496664, + "trace_id": "2b7833479bca2f3e76330b8dd7b7dc74", }, - ObjectContaining { + { "data": { "anthropic.response.timestamp": "2024-05-08T05:20:00.000Z", "gen_ai.operation.name": "models", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.id": "claude-3-haiku-20240307", @@ -64,11 +80,16 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "models claude-3-haiku-20240307", "op": "gen_ai.models", "origin": "auto.ai.anthropic", + "parent_span_id": "a73122fe2ffeaa43", + "span_id": "5600788c5f821d4a", + "start_timestamp": 1756393469.35, "status": "ok", + "timestamp": 1756393469.3605087, + "trace_id": "2b7833479bca2f3e76330b8dd7b7dc74", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/r
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > captures error in tool: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/dev-packages/node-integration-tests/suites/tracing/vercelai/v5/tmp_mevjbd6k_f7y8pd/node_modules/ai/dist/test/index.js","module":"ai.dist.test:index","function":"Object.?","lineno":45,"colno":21,"in_app":false,"pre_context":["","// src/test/not-implemented.ts","function notImplemented() {"," throw new Error(\"Not implemented\");","}","","// src/test/mock-embedding-model-v2.ts"],"context_line":"var import_vitest = require(\"vitest\");","post_context":["var MockEmbeddingModelV2 = class {"," constructor({"," provider = \"mock-provider\","," modelId = \"mock-model-id\","," maxEmbeddingsPerCall = 1,"," supportsParallelCalls = false,"," doEmbed = notImplemented"]},{"filename":"node:internal/modules/helpers","module":"helpers","function":"require","lineno":177,"colno":18,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.require","lineno":1231,"colno":19,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._load","lineno":1019,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1203,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._extensions..js","lineno":1422,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1364,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code,
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > captures error in tool: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"handleMainPromise","lineno":106,"colno":12,"in_app":false},{"filename":"node:internal/process/esm_loader","module":"esm_loader","function":"loadESM","lineno":34,"colno":7,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"ModuleLoader.import","lineno":337,"colno":24,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":195,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tco
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > creates ai related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/dev-packages/node-integration-tests/suites/tracing/vercelai/v5/tmp_mevjbd6k_dke88t/node_modules/ai/dist/test/index.js","module":"ai.dist.test:index","function":"Object.?","lineno":45,"colno":21,"in_app":false,"pre_context":["","// src/test/not-implemented.ts","function notImplemented() {"," throw new Error(\"Not implemented\");","}","","// src/test/mock-embedding-model-v2.ts"],"context_line":"var import_vitest = require(\"vitest\");","post_context":["var MockEmbeddingModelV2 = class {"," constructor({"," provider = \"mock-provider\","," modelId = \"mock-model-id\","," maxEmbeddingsPerCall = 1,"," supportsParallelCalls = false,"," doEmbed = notImplemented"]},{"filename":"node:internal/modules/helpers","module":"helpers","function":"require","lineno":177,"colno":18,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.require","lineno":1231,"colno":19,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._load","lineno":1019,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1203,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._extensions..js","lineno":1422,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1364,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code,
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > creates ai related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"handleMainPromise","lineno":106,"colno":12,"in_app":false},{"filename":"node:internal/process/esm_loader","module":"esm_loader","function":"loadESM","lineno":34,"colno":7,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"ModuleLoader.import","lineno":337,"colno":24,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":195,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tco
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > creates ai related spans with sendDefaultPii: false: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/dev-packages/node-integration-tests/suites/tracing/vercelai/v5/tmp_mevjbd6j_p5drkl/node_modules/ai/dist/test/index.js","module":"ai.dist.test:index","function":"Object.?","lineno":45,"colno":21,"in_app":false,"pre_context":["","// src/test/not-implemented.ts","function notImplemented() {"," throw new Error(\"Not implemented\");","}","","// src/test/mock-embedding-model-v2.ts"],"context_line":"var import_vitest = require(\"vitest\");","post_context":["var MockEmbeddingModelV2 = class {"," constructor({"," provider = \"mock-provider\","," modelId = \"mock-model-id\","," maxEmbeddingsPerCall = 1,"," supportsParallelCalls = false,"," doEmbed = notImplemented"]},{"filename":"node:internal/modules/helpers","module":"helpers","function":"require","lineno":177,"colno":18,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.require","lineno":1231,"colno":19,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._load","lineno":1019,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1203,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._extensions..js","lineno":1422,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1364,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code,
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > creates ai related spans with sendDefaultPii: false: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"handleMainPromise","lineno":106,"colno":12,"in_app":false},{"filename":"node:internal/process/esm_loader","module":"esm_loader","function":"loadESM","lineno":34,"colno":7,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"ModuleLoader.import","lineno":337,"colno":24,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":195,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tco
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > cjs > streams record response text when PII true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(13) } to match object { event_id: Any<String>, …(5) } (73 matching properties omitted from actual) - Expected + Received @@ -1,23 +1,60 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { - "data": ObjectContaining { + "spans": [ + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this please\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.request.stream": true, + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "4be4378a8032b644", + "span_id": "742a7e8a59688c13", + "start_timestamp": 1756393474.67, + "status": "ok", + "timestamp": 1756393474.6782923, + "trace_id": "25dc87dcf71590a5d6a35408c91737d1", }, - ObjectContaining { - "data": ObjectContaining { + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this too\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "4be4378a8032b644", + "span_id": "5cf32d865857d585", + "start_timestamp": 1756393474.679, + "status": "ok", + "timestamp": 1756393474.6846023, + "trace_id": "25dc87dcf71590a5d6a35408c91737d1", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/runner.ts:611:15
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > esm > streams record response text when PII true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(13) } to match object { event_id: Any<String>, …(5) } (73 matching properties omitted from actual) - Expected + Received @@ -1,23 +1,60 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { - "data": ObjectContaining { + "spans": [ + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this please\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.request.stream": true, + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "b7c567b83f127914", + "span_id": "bd904f782232b066", + "start_timestamp": 1756393474.074, + "status": "ok", + "timestamp": 1756393474.0809686, + "trace_id": "38ed5d60e7831dc0add2fae5f282fb71", }, - ObjectContaining { - "data": ObjectContaining { + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this too\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "b7c567b83f127914", + "span_id": "b7772b06956ae631", + "start_timestamp": 1756393474.081, + "status": "ok", + "timestamp": 1756393474.086857, + "trace_id": "38ed5d60e7831dc0add2fae5f282fb71", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/runner.ts:611:15
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > cjs > creates anthropic related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) } (74 matching properties omitted from actual) - Expected + Received @@ -1,31 +1,37 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { + "spans": [ + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.max_tokens": 100, "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.request.temperature": 0.7, "gen_ai.response.id": "msg_mock123", "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.text": "Hello from Anthropic mock!", + "gen_ai.response.tool_calls": "[]", "gen_ai.system": "anthropic", "gen_ai.usage.input_tokens": 10, "gen_ai.usage.output_tokens": 15, "gen_ai.usage.total_tokens": 25, "sentry.op": "gen_ai.messages", "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "6cb3ad046db5f4e4", + "span_id": "995be452679a6d43", + "start_timestamp": 1756393470.457, "status": "ok", + "timestamp": 1756393470.4682176, + "trace_id": "24e7764b99e129a135b79711ad8b6603", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"This will fail\"}]", "gen_ai.request.model": "error-model", "gen_ai.system": "anthropic", @@ -33,13 +39,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages error-model", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "6cb3ad046db5f4e4", + "span_id": "329a66c9744fdb3e", + "start_timestamp": 1756393470.469, "status": "unknown_error", + "timestamp": 1756393470.486711, + "trace_id": "24e7764b99e129a135b79711ad8b6603", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.text": "15", @@ -48,13 +59,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "6cb3ad046db5f4e4", + "span_id": "cac9e8cc7e1d1fe8", + "start_timestamp": 1756393470.487, "status": "ok", + "timestamp": 1756393470.5190973, + "trace_id": "24e7764b99e129a135b79711ad8b6603", }, - ObjectContaining { + { "data": { "anthropic.response.timestamp": "2024-05-08T05:20:00.000Z", "gen_ai.operation.name": "models", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.id": "claude-3-haiku-20240307", @@ -64,11 +80,16 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "models claude-3-haiku-20240307", "op": "gen_ai.models", "origin": "auto.ai.anthropic", + "parent_span_id": "6cb3ad046db5f4e4", + "span_id": "12a0d5b298086bd0", + "start_timestamp": 1756393470.52, "status": "ok", + "timestamp": 1756393470.5305665, + "trace_id": "24e7764b99e129a135b79711ad8b6603", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/r
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > esm > creates anthropic related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) } (74 matching properties omitted from actual) - Expected + Received @@ -1,31 +1,37 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { + "spans": [ + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.max_tokens": 100, "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.request.temperature": 0.7, "gen_ai.response.id": "msg_mock123", "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.text": "Hello from Anthropic mock!", + "gen_ai.response.tool_calls": "[]", "gen_ai.system": "anthropic", "gen_ai.usage.input_tokens": 10, "gen_ai.usage.output_tokens": 15, "gen_ai.usage.total_tokens": 25, "sentry.op": "gen_ai.messages", "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "34b6c7d42cf74841", + "span_id": "e20afe459da7f6bb", + "start_timestamp": 1756393469.731, "status": "ok", + "timestamp": 1756393469.7422435, + "trace_id": "bb73fb4602313d2b0870b362c415ab9c", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"This will fail\"}]", "gen_ai.request.model": "error-model", "gen_ai.system": "anthropic", @@ -33,13 +39,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages error-model", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "34b6c7d42cf74841", + "span_id": "e8342c1aec4a65ef", + "start_timestamp": 1756393469.742, "status": "unknown_error", + "timestamp": 1756393469.763366, + "trace_id": "bb73fb4602313d2b0870b362c415ab9c", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.text": "15", @@ -48,13 +59,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "34b6c7d42cf74841", + "span_id": "b962625a92474aae", + "start_timestamp": 1756393469.764, "status": "ok", + "timestamp": 1756393469.801206, + "trace_id": "bb73fb4602313d2b0870b362c415ab9c", }, - ObjectContaining { + { "data": { "anthropic.response.timestamp": "2024-05-08T05:20:00.000Z", "gen_ai.operation.name": "models", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.id": "claude-3-haiku-20240307", @@ -64,11 +80,16 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "models claude-3-haiku-20240307", "op": "gen_ai.models", "origin": "auto.ai.anthropic", + "parent_span_id": "34b6c7d42cf74841", + "span_id": "3384417c04ee38d2", + "start_timestamp": 1756393469.801, "status": "ok", + "timestamp": 1756393469.8116395, + "trace_id": "bb73fb4602313d2b0870b362c415ab9c", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/r
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > captures error in tool: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.?","lineno":1493,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"wrapModuleLoad","lineno":238,"colno":24,"in_app":false},{"filename":"node:diagnostics_channel","module":"node:diagnostics_channel","function":"TracingChannel.traceSync","lineno":322,"colno":14,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._load","lineno":1290,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1470,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Object..js","lineno":1871,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1738,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code, then it\\'s possible it was bundled into require() automatically by your bundler. '"," + 'In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all Com {snip}",")"]},{"filename":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","module":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","function":"?","in_app":false}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"3fbd6860ee18456eb5e9513d19b68f56","lev
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > captures error in tool: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"asyncRunEntryPointWithESMLoader","lineno":101,"colno":5,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"onImport.tracePromise.__proto__","lineno":683,"colno":26,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":371,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tconfigurable: true,"]}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"643990
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > creates ai related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.?","lineno":1493,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"wrapModuleLoad","lineno":238,"colno":24,"in_app":false},{"filename":"node:diagnostics_channel","module":"node:diagnostics_channel","function":"TracingChannel.traceSync","lineno":322,"colno":14,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._load","lineno":1290,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1470,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Object..js","lineno":1871,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1738,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code, then it\\'s possible it was bundled into require() automatically by your bundler. '"," + 'In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all Com {snip}",")"]},{"filename":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","module":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","function":"?","in_app":false}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"478450c92fa14dc0922602fc506528a8","lev
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > creates ai related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"asyncRunEntryPointWithESMLoader","lineno":101,"colno":5,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"onImport.tracePromise.__proto__","lineno":683,"colno":26,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":371,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tconfigurable: true,"]}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"0de0b1
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > cjs > creates ai related spans with sendDefaultPii: false: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.\n\nIf you are using \"import\" in your source code, then it's possible it was bundled into require() automatically by your bundler. In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.","stacktrace":{"frames":[{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/require-in-the-middle/index.js","module":"require-in-the-middle:index","function":"Module.require","lineno":188,"colno":39,"in_app":false,"pre_context":[" // Check if this module has a patcher in-progress already."," // Otherwise, mark this module as patching in-progress."," const isPatching = patching.has(filename)"," if (isPatching === false) {"," patching.add(filename)"," }",""],"context_line":" const exports = self._origRequire.apply(this, arguments)","post_context":[""," // If it's already patched, just return it as-is."," if (isPatching === true) {"," debug('module is in the process of being patched already - ignoring: %s', filename)"," return exports"," }",""]},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.?","lineno":1493,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"wrapModuleLoad","lineno":238,"colno":24,"in_app":false},{"filename":"node:diagnostics_channel","module":"node:diagnostics_channel","function":"TracingChannel.traceSync","lineno":322,"colno":14,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._load","lineno":1290,"colno":12,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module.load","lineno":1470,"colno":32,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Object..js","lineno":1871,"colno":10,"in_app":false},{"filename":"node:internal/modules/cjs/loader","module":"loader","function":"Module._compile","lineno":1738,"colno":14,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/index.cjs","module":"vitest:index","function":"Object.?","lineno":1,"colno":7,"in_app":false,"pre_context":[],"context_line":"throw new Error(","post_context":[" 'Vitest cannot be imported in a CommonJS module using require(). Please use \"import\" instead.'"," + '\\n\\nIf you are using \"import\" in your source code, then it\\'s possible it was bundled into require() automatically by your bundler. '"," + 'In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all Com {snip}",")"]},{"filename":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","module":"case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import(","function":"?","in_app":false}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"fd8c546d4d654df8b3e5446d0048c8ef","lev
suites/tracing/vercelai/v5/test.ts > Vercel AI integration (V5) > esm/cjs > esm > creates ai related spans with sendDefaultPii: false: dev-packages/node-integration-tests/utils/runner.ts#L466
Error: Expected envelope item type 'transaction' but got 'event'. Item: [{"type":"event"},{"exception":{"values":[{"type":"Error","value":"Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n","stacktrace":{"frames":[{"filename":"node:internal/modules/run_main","module":"run_main","function":"asyncRunEntryPointWithESMLoader","lineno":101,"colno":5,"in_app":false},{"filename":"node:internal/modules/esm/loader","module":"loader","function":"onImport.tracePromise.__proto__","lineno":683,"colno":26,"in_app":false},{"filename":"node:internal/modules/esm/module_job","module":"module_job","function":"ModuleJob.run","lineno":371,"colno":25,"in_app":false},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"?","lineno":464,"colno":22,"in_app":false,"pre_context":["\t\t});","\t}","\tchai$1.util.addMethod(expect, \"assertions\", assertions);","\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);","\texpect.extend(customMatchers);","\treturn expect;","}"],"context_line":"const globalExpect = createExpect();","post_context":["Object.defineProperty(globalThis, GLOBAL_EXPECT, {","\tvalue: globalExpect,","\twritable: true,","\tconfigurable: true","});","","/**"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js","module":"vitest.dist.chunks:vi.bdSIJ99Y","function":"createExpect","lineno":426,"colno":16,"in_app":false,"pre_context":["\tsetState({","\t\t...globalState,","\t\tassertionCalls: 0,","\t\tisExpectingAssertions: false,","\t\tisExpectingAssertionsError: null,","\t\texpectedAssertionsNumber: null,","\t\texpectedAssertionsNumberErrorGen: null,"],"context_line":"\t\tenvironment: getCurrentEnvironment(),","post_context":["\t\tget testPath() {","\t\t\treturn getWorkerState().filepath;","\t\t},","\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName","\t}, expect);","\t// @ts-expect-error untyped","\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getCurrentEnvironment","lineno":23,"colno":16,"in_app":false,"pre_context":["\t\tconfigurable: true,","\t\twritable: true,","\t\tenumerable: false","\t});","\treturn state;","}","function getCurrentEnvironment() {"],"context_line":"\tconst state = getWorkerState();","post_context":["\treturn state?.environment.name;","}","function isChildProcess() {","\treturn typeof process !== \"undefined\" && !!process.send;","}","function setProcessTitle(title) {","\ttry {"]},{"filename":"/home/runner/work/sentry-javascript/sentry-javascript/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js","module":"vitest.dist.chunks:utils.XdZDrNZV","function":"getWorkerState","lineno":9,"colno":9,"in_app":false,"pre_context":["","const NAME_WORKER_STATE = \"__vitest_worker__\";","function getWorkerState() {","\t// @ts-expect-error untyped global","\tconst workerState = globalThis[NAME_WORKER_STATE];","\tif (!workerState) {","\t\tconst errorMsg = \"Vitest failed to access its internal state.\\n\\nOne of the following is possible:\\n- \\\"vitest\\\" is imported directly with {snip}"],"context_line":"\t\tthrow new Error(errorMsg);","post_context":["\t}","\treturn workerState;","}","function provideWorkerState(context, state) {","\tObject.defineProperty(context, NAME_WORKER_STATE, {","\t\tvalue: state,","\t\tconfigurable: true,"]}]},"mechanism":{"type":"onuncaughtexception","handled":false}}]},"event_id":"4342be
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > cjs > streams record response text when PII true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(13) } to match object { event_id: Any<String>, …(5) } (73 matching properties omitted from actual) - Expected + Received @@ -1,23 +1,60 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { - "data": ObjectContaining { + "spans": [ + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this please\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.request.stream": true, + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "80847dd4949ca609", + "span_id": "702724d8985b6353", + "start_timestamp": 1756393615.433, + "status": "ok", + "timestamp": 1756393615.4422836, + "trace_id": "2fe9507776b3899b125ff096fb820d3e", }, - ObjectContaining { - "data": ObjectContaining { + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this too\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "80847dd4949ca609", + "span_id": "a2e2dc56204dc926", + "start_timestamp": 1756393615.443, + "status": "ok", + "timestamp": 1756393615.448574, + "trace_id": "2fe9507776b3899b125ff096fb820d3e", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/runner.ts:611:15
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > esm > streams record response text when PII true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(13) } to match object { event_id: Any<String>, …(5) } (73 matching properties omitted from actual) - Expected + Received @@ -1,23 +1,60 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { - "data": ObjectContaining { + "spans": [ + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this please\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.request.stream": true, + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "42037500a3526b07", + "span_id": "3431e54978c16546", + "start_timestamp": 1756393614.892, + "status": "ok", + "timestamp": 1756393614.8984714, + "trace_id": "5e5a0b7e5be0494dc1ee058810352f14", }, - ObjectContaining { - "data": ObjectContaining { + { + "data": { + "gen_ai.operation.name": "messages", + "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"Stream this too\"}]", + "gen_ai.request.model": "claude-3-haiku-20240307", + "gen_ai.response.finish_reasons": "[\"end_turn\"]", + "gen_ai.response.id": "msg_stream_1", + "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.streaming": true, - "gen_ai.response.text": "Hello from stream!", + "gen_ai.system": "anthropic", + "gen_ai.usage.input_tokens": 10, + "gen_ai.usage.output_tokens": 15, + "gen_ai.usage.total_tokens": 25, + "sentry.op": "gen_ai.messages", + "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307 stream-response", "op": "gen_ai.messages", + "origin": "auto.ai.anthropic", + "parent_span_id": "42037500a3526b07", + "span_id": "6296c5a1030afb56", + "start_timestamp": 1756393614.9, + "status": "ok", + "timestamp": 1756393614.9069853, + "trace_id": "5e5a0b7e5be0494dc1ee058810352f14", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/runner.ts:611:15
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > cjs > creates anthropic related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) } (74 matching properties omitted from actual) - Expected + Received @@ -1,31 +1,37 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { + "spans": [ + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.max_tokens": 100, "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.request.temperature": 0.7, "gen_ai.response.id": "msg_mock123", "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.text": "Hello from Anthropic mock!", + "gen_ai.response.tool_calls": "[]", "gen_ai.system": "anthropic", "gen_ai.usage.input_tokens": 10, "gen_ai.usage.output_tokens": 15, "gen_ai.usage.total_tokens": 25, "sentry.op": "gen_ai.messages", "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "ff9855c961a8c49c", + "span_id": "14e3ecca0564b375", + "start_timestamp": 1756393611.781, "status": "ok", + "timestamp": 1756393611.7922933, + "trace_id": "8573c636b4ba90a0ff00b39d2df1facc", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"This will fail\"}]", "gen_ai.request.model": "error-model", "gen_ai.system": "anthropic", @@ -33,13 +39,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages error-model", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "ff9855c961a8c49c", + "span_id": "fc0f8df7d6301051", + "start_timestamp": 1756393611.793, "status": "unknown_error", + "timestamp": 1756393611.813482, + "trace_id": "8573c636b4ba90a0ff00b39d2df1facc", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.text": "15", @@ -48,13 +59,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "ff9855c961a8c49c", + "span_id": "6bfb468e09dc76d9", + "start_timestamp": 1756393611.814, "status": "ok", + "timestamp": 1756393611.850131, + "trace_id": "8573c636b4ba90a0ff00b39d2df1facc", }, - ObjectContaining { + { "data": { "anthropic.response.timestamp": "2024-05-08T05:20:00.000Z", "gen_ai.operation.name": "models", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.id": "claude-3-haiku-20240307", @@ -64,11 +80,16 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "models claude-3-haiku-20240307", "op": "gen_ai.models", "origin": "auto.ai.anthropic", + "parent_span_id": "ff9855c961a8c49c", + "span_id": "a71139ba9c498291", + "start_timestamp": 1756393611.85, "status": "ok", + "timestamp": 1756393611.8605056, + "trace_id": "8573c636b4ba90a0ff00b39d2df1facc", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils/ru
suites/tracing/anthropic/test.ts > Anthropic integration > esm/cjs > esm > creates anthropic related spans with sendDefaultPii: true: dev-packages/node-integration-tests/utils/assertions.ts#L34
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) } (74 matching properties omitted from actual) - Expected + Received @@ -1,31 +1,37 @@ { "event_id": Any<String>, - "spans": ArrayContaining [ - ObjectContaining { + "spans": [ + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.max_tokens": 100, "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.request.temperature": 0.7, "gen_ai.response.id": "msg_mock123", "gen_ai.response.model": "claude-3-haiku-20240307", "gen_ai.response.text": "Hello from Anthropic mock!", + "gen_ai.response.tool_calls": "[]", "gen_ai.system": "anthropic", "gen_ai.usage.input_tokens": 10, "gen_ai.usage.output_tokens": 15, "gen_ai.usage.total_tokens": 25, "sentry.op": "gen_ai.messages", "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "acc8b8b37e97072e", + "span_id": "9f68be26b50e7039", + "start_timestamp": 1756393611.194, "status": "ok", + "timestamp": 1756393611.2052553, + "trace_id": "56a8af095d7852ea1290a232940cfdb7", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"This will fail\"}]", "gen_ai.request.model": "error-model", "gen_ai.system": "anthropic", @@ -33,13 +39,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages error-model", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "acc8b8b37e97072e", + "span_id": "74f8e602060c9f64", + "start_timestamp": 1756393611.205, "status": "unknown_error", + "timestamp": 1756393611.2253654, + "trace_id": "56a8af095d7852ea1290a232940cfdb7", }, - ObjectContaining { + { "data": { "gen_ai.operation.name": "messages", "gen_ai.request.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.text": "15", @@ -48,13 +59,18 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "messages claude-3-haiku-20240307", "op": "gen_ai.messages", "origin": "auto.ai.anthropic", + "parent_span_id": "acc8b8b37e97072e", + "span_id": "4ec11e322abdcb91", + "start_timestamp": 1756393611.226, "status": "ok", + "timestamp": 1756393611.2359433, + "trace_id": "56a8af095d7852ea1290a232940cfdb7", }, - ObjectContaining { + { "data": { "anthropic.response.timestamp": "2024-05-08T05:20:00.000Z", "gen_ai.operation.name": "models", "gen_ai.request.model": "claude-3-haiku-20240307", "gen_ai.response.id": "claude-3-haiku-20240307", @@ -64,11 +80,16 @@ "sentry.origin": "auto.ai.anthropic", }, "description": "models claude-3-haiku-20240307", "op": "gen_ai.models", "origin": "auto.ai.anthropic", + "parent_span_id": "acc8b8b37e97072e", + "span_id": "57b6d76415fba91a", + "start_timestamp": 1756393611.236, "status": "ok", + "timestamp": 1756393611.2677455, + "trace_id": "56a8af095d7852ea1290a232940cfdb7", }, ], "start_timestamp": Anything, "timestamp": Anything, "transaction": "main", ❯ assertSentryTransaction utils/assertions.ts:34:18 ❯ expectTransactionEvent utils/runner.ts:705:5 ❯ newEnvelope utils/runner.ts:477:15 ❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:593:15 ❯ Socket.<anonymous> utils
All required jobs passed or were skipped
Process completed with exit code 1.

Artifacts

Produced during runtime
Name Size Digest
build-output Expired
20 MB
sha256:0d103900e4f11e5775c20c257ba7e981dbf6c4b773b6b18c43f7d7d2a647f2c6
playwright-traces-job_browser_loader_tests-loader_base Expired
13 KB
sha256:6151ce2c5ca2fbda2ab6810d15dd39fb6f9a887c7b48b4d94274815fa89dc14c