Skip to content

Commit a46f2eb

Browse files
RulaKhaledclaude
andcommitted
test(node): Use GEN_AI_CHAT constant in nested runtime context test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent bac93e3 commit a46f2eb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • dev-packages/node-integration-tests/suites/tracing/langchain/v1

‎dev-packages/node-integration-tests/suites/tracing/langchain/v1/test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
SENTRY_OP,
2121
SENTRY_ORIGIN,
2222
} from '@sentry/conventions/attributes';
23-
import { GEN_AI_DECIDE } from '@sentry/conventions/op';
23+
import { GEN_AI_CHAT, GEN_AI_DECIDE } from '@sentry/conventions/op';
2424
import { GEN_AI_RESPONSE_STOP_REASON_ATTRIBUTE } from '../../../../../../packages/server-utils/src/ai/core/gen-ai-attributes';
2525
import { cleanupChildProcesses, createEsmAndCjsTests } from '../../../../utils/runner';
2626
import { createEsmTests } from '../../../../utils/runner/createEsmAndCjsTests';
@@ -256,7 +256,7 @@ describe('LangChain integration (v1)', () => {
256256
}
257257
return names;
258258
};
259-
const chatSpans = spans.filter(span => span.attributes[SENTRY_OP]?.value === 'gen_ai.chat');
259+
const chatSpans = spans.filter(span => span.attributes[SENTRY_OP]?.value === GEN_AI_CHAT);
260260

261261
expect(chatSpans).toHaveLength(2);
262262
expect(
@@ -269,7 +269,7 @@ describe('LangChain integration (v1)', () => {
269269
const handlerRunSpans = spans.filter(
270270
span =>
271271
span.attributes[SENTRY_ORIGIN]?.value === 'auto.ai.langchain' &&
272-
span.attributes[SENTRY_OP]?.value !== 'gen_ai.chat',
272+
span.attributes[SENTRY_OP]?.value !== GEN_AI_CHAT,
273273
);
274274
expect(handlerRunSpans.map(span => span.name).sort()).toEqual([
275275
'execute_tool lookup_weather',

0 commit comments

Comments
 (0)