diff --git a/dev-packages/node-integration-tests/suites/tracing/anthropic/test.ts b/dev-packages/node-integration-tests/suites/tracing/anthropic/test.ts index ee2bb16b37dc..106b1e7f4d6b 100644 --- a/dev-packages/node-integration-tests/suites/tracing/anthropic/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/anthropic/test.ts @@ -93,6 +93,14 @@ describe('Anthropic integration', () => { expect(streamingSpan!.name).toBe('chat claude-3-haiku-20240307'); expect(streamingSpan!.status).toBe('ok'); expect(streamingSpan!.attributes[GEN_AI_RESPONSE_STREAMING].value).toBe(true); + + for (const span of [completionSpan!, errorSpan!, streamingSpan!]) { + expect(span.attributes[GEN_AI_INPUT_MESSAGES]).toBeUndefined(); + expect(span.attributes[GEN_AI_SYSTEM_INSTRUCTIONS]).toBeUndefined(); + expect(span.attributes[GEN_AI_RESPONSE_TEXT]).toBeUndefined(); + expect(span.attributes[GEN_AI_RESPONSE_TOOL_CALLS]).toBeUndefined(); + expect(span.attributes[GEN_AI_TOOL_DEFINITIONS]).toBeUndefined(); + } }, }) .expect({ event: EXPECTED_STREAM_EVENT_HANDLER_MESSAGE }) diff --git a/dev-packages/node-integration-tests/suites/tracing/google-genai/test.ts b/dev-packages/node-integration-tests/suites/tracing/google-genai/test.ts index 6f51960996fa..f2b15fe19475 100644 --- a/dev-packages/node-integration-tests/suites/tracing/google-genai/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/google-genai/test.ts @@ -81,6 +81,15 @@ describe('Google GenAI integration', () => { expect(errorSpan!.attributes[GEN_AI_OPERATION_NAME].value).toBe('generate_content'); expect(errorSpan!.attributes[GEN_AI_PROVIDER_NAME].value).toBe('google_genai'); expect(errorSpan!.attributes[GEN_AI_REQUEST_MODEL].value).toBe('error-model'); + + for (const span of [chatSpan!, generateContentSpan!, errorSpan!]) { + expect(span.attributes[GEN_AI_INPUT_MESSAGES]).toBeUndefined(); + expect(span.attributes[GEN_AI_SYSTEM_INSTRUCTIONS]).toBeUndefined(); + expect(span.attributes[GEN_AI_OUTPUT_MESSAGES]).toBeUndefined(); + expect(span.attributes[GEN_AI_RESPONSE_TEXT]).toBeUndefined(); + expect(span.attributes[GEN_AI_RESPONSE_TOOL_CALLS]).toBeUndefined(); + expect(span.attributes[GEN_AI_TOOL_DEFINITIONS]).toBeUndefined(); + } }, }) .start() @@ -352,6 +361,15 @@ describe('Google GenAI integration', () => { expect(errorSpan!.status).toBe('error'); expect(errorSpan!.attributes['sentry.op'].value).toBe('gen_ai.generate_content'); expect(errorSpan!.attributes[GEN_AI_OPERATION_NAME].value).toBe('generate_content'); + + for (const span of [generateContentSpan!, chatSpan!, blockedSpan!, errorSpan!]) { + expect(span.attributes[GEN_AI_INPUT_MESSAGES]).toBeUndefined(); + expect(span.attributes[GEN_AI_SYSTEM_INSTRUCTIONS]).toBeUndefined(); + expect(span.attributes[GEN_AI_OUTPUT_MESSAGES]).toBeUndefined(); + expect(span.attributes[GEN_AI_RESPONSE_TEXT]).toBeUndefined(); + expect(span.attributes[GEN_AI_RESPONSE_TOOL_CALLS]).toBeUndefined(); + expect(span.attributes[GEN_AI_TOOL_DEFINITIONS]).toBeUndefined(); + } }, }) .start() @@ -511,6 +529,7 @@ describe('Google GenAI integration', () => { expect(errorSpan!.status).toBe('error'); expect(errorSpan!.attributes['sentry.op'].value).toBe('gen_ai.embeddings'); expect(errorSpan!.attributes[GEN_AI_OPERATION_NAME].value).toBe('embeddings'); + expect(errorSpan!.attributes[GEN_AI_EMBEDDINGS_INPUT]).toBeUndefined(); }, }) .start() diff --git a/dev-packages/node-integration-tests/suites/tracing/langchain/test.ts b/dev-packages/node-integration-tests/suites/tracing/langchain/test.ts index 1d74840579bc..479bfe02d49a 100644 --- a/dev-packages/node-integration-tests/suites/tracing/langchain/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/langchain/test.ts @@ -82,6 +82,13 @@ describe('LangChain integration', () => { expect(errorSpan!.attributes['sentry.origin'].value).toBe('auto.ai.langchain'); expect(errorSpan!.attributes[GEN_AI_PROVIDER_NAME].value).toBe('anthropic'); expect(errorSpan!.attributes[GEN_AI_REQUEST_MODEL].value).toBe('error-model'); + + for (const span of [sonnetSpan!, opusSpan!, errorSpan!]) { + expect(span.attributes[GEN_AI_INPUT_MESSAGES]).toBeUndefined(); + expect(span.attributes[GEN_AI_SYSTEM_INSTRUCTIONS]).toBeUndefined(); + expect(span.attributes[GEN_AI_RESPONSE_TEXT]).toBeUndefined(); + expect(span.attributes[GEN_AI_RESPONSE_TOOL_CALLS]).toBeUndefined(); + } }, }) .start() @@ -333,6 +340,10 @@ describe('LangChain integration', () => { expect(errorSpan!.status).toBe('error'); expect(errorSpan!.attributes['sentry.op'].value).toBe(GEN_AI_EMBEDDINGS); expect(errorSpan!.attributes[GEN_AI_PROVIDER_NAME].value).toBe('openai'); + + for (const span of [...successfulSpans, errorSpan!]) { + expect(span.attributes[GEN_AI_EMBEDDINGS_INPUT]).toBeUndefined(); + } }, }) .start()