ref(node): use replaceExports core utility for openai/anthropic client patching #45318
Annotations
10 errors and 6 warnings
|
Run integration tests:
dev-packages/node-integration-tests/utils/assertions.ts#L35
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) }
(92 matching properties omitted from actual)
- Expected
+ Received
@@ -1,57 +1,94 @@
{
"event_id": Any<String>,
- "spans": ArrayContaining [
- ObjectContaining {
+ "spans": [
+ {
"data": {
- "gen_ai.embeddings.input": "Embedding test!",
- "gen_ai.operation.name": "embeddings",
- "gen_ai.request.dimensions": 1536,
- "gen_ai.request.encoding_format": "float",
- "gen_ai.request.model": "text-embedding-3-small",
- "gen_ai.response.model": "text-embedding-3-small",
- "gen_ai.system": "openai",
- "gen_ai.usage.input_tokens": 10,
- "gen_ai.usage.total_tokens": 10,
- "sentry.op": "gen_ai.embeddings",
- "sentry.origin": "auto.ai.openai",
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 46193,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 46193,
+ "url": "http://localhost:46193/openai/embeddings",
+ "url.full": "http://localhost:46193/openai/embeddings",
+ "url.path": "/openai/embeddings",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "OpenAI/JS 5.18.1",
},
- "description": "embeddings text-embedding-3-small",
- "op": "gen_ai.embeddings",
- "origin": "auto.ai.openai",
+ "description": "POST http://localhost:46193/openai/embeddings",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "467a3b615c5bb431",
+ "span_id": "a116e50d2a5783e6",
+ "start_timestamp": 1775216642.257,
"status": "ok",
+ "timestamp": 1775216642.3128207,
+ "trace_id": "da007580c26f3688ef18e9eef5dabfb1",
},
- ObjectContaining {
+ {
"data": {
- "gen_ai.embeddings.input": "Error embedding test!",
- "gen_ai.operation.name": "embeddings",
- "gen_ai.request.model": "error-model",
- "gen_ai.system": "openai",
- "sentry.op": "gen_ai.embeddings",
- "sentry.origin": "auto.ai.openai",
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 404,
+ "network.peer.address": "::1",
+ "network.peer.port": 46193,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 46193,
+ "url": "http://localhost:46193/openai/embeddings",
+ "url.full": "http://localhost:46193/openai/embeddings",
+ "url.path": "/openai/embeddings",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "OpenAI/JS 5.18.1",
},
- "description": "embeddings error-model",
- "op": "gen_ai.embeddings",
- "origin": "auto.ai.openai",
- "status": "internal_error",
+ "description": "POST http://localhost:46193/openai/embeddings",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "467a3b615c5bb431",
+ "span_id": "9a73cd87e9d47082",
+ "start_timestamp": 1775216642.316,
+ "status": "not_found",
+ "timestamp": 1775216642.3223765,
+ "trace_id": "da007580c26f3688ef18e9eef5dabfb1",
},
- ObjectContaining {
+ {
"data": {
- "gen_ai.embeddings.input": "[\"First input text\",\"Second input text\",\"Third input text\"]",
- "gen_ai.operation.name": "embeddings",
- "gen_ai.request.model": "text-embedding-3-small",
- "gen_ai.response.model": "text-embedding-3-small",
- "gen_ai.system": "openai",
- "
|
|
Run integration tests:
dev-packages/node-integration-tests/utils/assertions.ts#L35
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) }
(92 matching properties omitted from actual)
- Expected
+ Received
@@ -1,38 +1,94 @@
{
"event_id": Any<String>,
- "spans": ArrayContaining [
- ObjectContaining {
+ "spans": [
+ {
"data": {
- "gen_ai.operation.name": "embeddings",
- "gen_ai.request.dimensions": 1536,
- "gen_ai.request.encoding_format": "float",
- "gen_ai.request.model": "text-embedding-3-small",
- "gen_ai.response.model": "text-embedding-3-small",
- "gen_ai.system": "openai",
- "gen_ai.usage.input_tokens": 10,
- "gen_ai.usage.total_tokens": 10,
- "sentry.op": "gen_ai.embeddings",
- "sentry.origin": "auto.ai.openai",
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 33517,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 33517,
+ "url": "http://localhost:33517/openai/embeddings",
+ "url.full": "http://localhost:33517/openai/embeddings",
+ "url.path": "/openai/embeddings",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "OpenAI/JS 5.18.1",
},
- "description": "embeddings text-embedding-3-small",
- "op": "gen_ai.embeddings",
- "origin": "auto.ai.openai",
+ "description": "POST http://localhost:33517/openai/embeddings",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "43c56f0bab9c19b2",
+ "span_id": "2f3ecdf2e2a31bd1",
+ "start_timestamp": 1775216640.586,
"status": "ok",
+ "timestamp": 1775216640.6335006,
+ "trace_id": "ad5ecc8ad9b28dbe7e5f6215a8f1421e",
},
- ObjectContaining {
+ {
"data": {
- "gen_ai.operation.name": "embeddings",
- "gen_ai.request.model": "error-model",
- "gen_ai.system": "openai",
- "sentry.op": "gen_ai.embeddings",
- "sentry.origin": "auto.ai.openai",
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 404,
+ "network.peer.address": "::1",
+ "network.peer.port": 33517,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 33517,
+ "url": "http://localhost:33517/openai/embeddings",
+ "url.full": "http://localhost:33517/openai/embeddings",
+ "url.path": "/openai/embeddings",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "OpenAI/JS 5.18.1",
},
- "description": "embeddings error-model",
- "op": "gen_ai.embeddings",
- "origin": "auto.ai.openai",
- "status": "internal_error",
+ "description": "POST http://localhost:33517/openai/embeddings",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "43c56f0bab9c19b2",
+ "span_id": "0828e0872e302856",
+ "start_timestamp": 1775216640.64,
+ "status": "not_found",
+ "timestamp": 1775216640.6548643,
+ "trace_id": "ad5ecc8ad9b28dbe7e5f6215a8f1421e",
+ },
+ {
+ "data": {
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 33517,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 33517,
+ "url": "http://localhost:33517/openai/embedd
|
|
Run integration tests:
dev-packages/node-integration-tests/utils/assertions.ts#L35
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) }
(92 matching properties omitted from actual)
- Expected
+ Received
@@ -1,20 +1,297 @@
{
"event_id": Any<String>,
- "spans": ArrayContaining [
- ObjectContaining {
- "data": ObjectContaining {
- "gen_ai.input.messages": Any<String>,
- "gen_ai.response.text": Any<String>,
+ "spans": [
+ {
+ "data": {
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 36819,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 36819,
+ "url": "http://localhost:36819/openai/chat/completions",
+ "url.full": "http://localhost:36819/openai/chat/completions",
+ "url.path": "/openai/chat/completions",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "OpenAI/JS 5.18.1",
+ },
+ "description": "POST http://localhost:36819/openai/chat/completions",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "a8d7bbac2e7987d5",
+ "span_id": "cb46115115646135",
+ "start_timestamp": 1775216636.096,
+ "status": "ok",
+ "timestamp": 1775216636.1495962,
+ "trace_id": "ac068255d34742a2262cb4b2876dfce4",
+ },
+ {
+ "data": {
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 36819,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 36819,
+ "url": "http://localhost:36819/openai/responses",
+ "url.full": "http://localhost:36819/openai/responses",
+ "url.path": "/openai/responses",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "OpenAI/JS 5.18.1",
+ },
+ "description": "POST http://localhost:36819/openai/responses",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "a8d7bbac2e7987d5",
+ "span_id": "7fb7506536f132c5",
+ "start_timestamp": 1775216636.156,
+ "status": "ok",
+ "timestamp": 1775216636.1701086,
+ "trace_id": "ac068255d34742a2262cb4b2876dfce4",
+ },
+ {
+ "data": {
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 500,
+ "network.peer.address": "::1",
+ "network.peer.port": 36819,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 36819,
+ "url": "http://localhost:36819/openai/chat/completions",
+ "url.full": "http://localhost:36819/openai/chat/completions",
+ "url.path": "/openai/chat/completions",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "OpenAI/JS 5.18.1",
+ },
+ "description": "POST http://localhost:36819/openai/chat/completions",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "a8d7bbac2e7987d5",
+ "span_id": "c66e0bbcb50f3a31",
+ "start_timestamp": 1775216636.172,
+ "status": "internal_error",
+ "timestamp": 1775216636.1790507,
+ "trace_id": "ac068255d34742a2262cb4b2876dfce4",
+ },
+ {
+ "data": {
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 500,
+ "network.peer.addr
|
|
Run integration tests:
dev-packages/node-integration-tests/utils/assertions.ts#L35
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) }
(92 matching properties omitted from actual)
- Expected
+ Received
@@ -1,134 +1,297 @@
{
"event_id": Any<String>,
- "spans": ArrayContaining [
- ObjectContaining {
+ "spans": [
+ {
"data": {
- "gen_ai.input.messages": "[{\"role\":\"user\",\"content\":\"What is the capital of France?\"}]",
- "gen_ai.operation.name": "chat",
- "gen_ai.request.model": "gpt-3.5-turbo",
- "gen_ai.request.temperature": 0.7,
- "gen_ai.response.finish_reasons": "[\"stop\"]",
- "gen_ai.response.id": "chatcmpl-mock123",
- "gen_ai.response.model": "gpt-3.5-turbo",
- "gen_ai.response.text": "[\"Hello from OpenAI mock!\"]",
- "gen_ai.system": "openai",
- "gen_ai.system_instructions": "[{\"type\":\"text\",\"content\":\"You are a helpful assistant.\"}]",
- "gen_ai.usage.input_tokens": 10,
- "gen_ai.usage.output_tokens": 15,
- "gen_ai.usage.total_tokens": 25,
- "sentry.op": "gen_ai.chat",
- "sentry.origin": "auto.ai.openai",
- "sentry.sdk_meta.gen_ai.input.messages.original_length": 1,
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 43647,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 43647,
+ "url": "http://localhost:43647/openai/chat/completions",
+ "url.full": "http://localhost:43647/openai/chat/completions",
+ "url.path": "/openai/chat/completions",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "OpenAI/JS 5.18.1",
},
- "description": "chat gpt-3.5-turbo",
- "op": "gen_ai.chat",
- "origin": "auto.ai.openai",
+ "description": "POST http://localhost:43647/openai/chat/completions",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "bd83e24099b476b4",
+ "span_id": "16c2e70fb7886bd7",
+ "start_timestamp": 1775216628.99,
"status": "ok",
+ "timestamp": 1775216629.0415757,
+ "trace_id": "5062e6e80810358323134cf65ec3c8eb",
},
- ObjectContaining {
+ {
"data": {
- "gen_ai.input.messages": "Translate this to French: Hello",
- "gen_ai.operation.name": "chat",
- "gen_ai.request.model": "gpt-3.5-turbo",
- "gen_ai.response.finish_reasons": "[\"completed\"]",
- "gen_ai.response.id": "resp_mock456",
- "gen_ai.response.model": "gpt-3.5-turbo",
- "gen_ai.response.text": "Response to: Translate this to French: Hello",
- "gen_ai.system": "openai",
- "gen_ai.usage.input_tokens": 5,
- "gen_ai.usage.output_tokens": 8,
- "gen_ai.usage.total_tokens": 13,
- "sentry.op": "gen_ai.chat",
- "sentry.origin": "auto.ai.openai",
- "sentry.sdk_meta.gen_ai.input.messages.original_length": 1,
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 43647,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 43647,
+ "url": "http://localhost:43647/openai/responses",
+ "url.full": "http://localhost:43647/openai/responses",
+ "url.path": "/openai/responses",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "OpenAI/JS 5.18.1",
},
- "description": "chat gpt-3.5-turbo",
- "op": "gen_ai.chat",
- "origin": "auto.ai.openai",
+ "description":
|
|
Run integration tests:
dev-packages/node-integration-tests/utils/assertions.ts#L35
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) }
(92 matching properties omitted from actual)
- Expected
+ Received
@@ -1,116 +1,297 @@
{
"event_id": Any<String>,
- "spans": ArrayContaining [
- ObjectContaining {
+ "spans": [
+ {
"data": {
- "gen_ai.operation.name": "chat",
- "gen_ai.request.model": "gpt-3.5-turbo",
- "gen_ai.request.temperature": 0.7,
- "gen_ai.response.finish_reasons": "[\"stop\"]",
- "gen_ai.response.id": "chatcmpl-mock123",
- "gen_ai.response.model": "gpt-3.5-turbo",
- "gen_ai.system": "openai",
- "gen_ai.usage.input_tokens": 10,
- "gen_ai.usage.output_tokens": 15,
- "gen_ai.usage.total_tokens": 25,
- "sentry.op": "gen_ai.chat",
- "sentry.origin": "auto.ai.openai",
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 39117,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 39117,
+ "url": "http://localhost:39117/openai/chat/completions",
+ "url.full": "http://localhost:39117/openai/chat/completions",
+ "url.path": "/openai/chat/completions",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "OpenAI/JS 5.18.1",
},
- "description": "chat gpt-3.5-turbo",
- "op": "gen_ai.chat",
- "origin": "auto.ai.openai",
+ "description": "POST http://localhost:39117/openai/chat/completions",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "0097e7c80af393b8",
+ "span_id": "c14b6cb802fe38db",
+ "start_timestamp": 1775216621.375,
"status": "ok",
+ "timestamp": 1775216621.4224958,
+ "trace_id": "8ea39f09b50fa0623100f2153000ef68",
},
- ObjectContaining {
+ {
"data": {
- "gen_ai.operation.name": "chat",
- "gen_ai.request.model": "gpt-3.5-turbo",
- "gen_ai.response.finish_reasons": "[\"completed\"]",
- "gen_ai.response.id": "resp_mock456",
- "gen_ai.response.model": "gpt-3.5-turbo",
- "gen_ai.system": "openai",
- "gen_ai.usage.input_tokens": 5,
- "gen_ai.usage.output_tokens": 8,
- "gen_ai.usage.total_tokens": 13,
- "sentry.op": "gen_ai.chat",
- "sentry.origin": "auto.ai.openai",
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 39117,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 39117,
+ "url": "http://localhost:39117/openai/responses",
+ "url.full": "http://localhost:39117/openai/responses",
+ "url.path": "/openai/responses",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "OpenAI/JS 5.18.1",
},
- "description": "chat gpt-3.5-turbo",
- "op": "gen_ai.chat",
- "origin": "auto.ai.openai",
+ "description": "POST http://localhost:39117/openai/responses",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "0097e7c80af393b8",
+ "span_id": "f9def8a1c2218539",
+ "start_timestamp": 1775216621.427,
"status": "ok",
+ "timestamp": 1775216621.4441113,
+ "trace_id": "8ea39f09b50fa0623100f2153000ef68",
},
- ObjectContaining {
+ {
"data": {
- "gen_ai.operation.name": "chat",
- "gen_ai.request.model": "error-model",
- "gen_ai.system": "openai",
- "se
|
|
Run integration tests:
dev-packages/node-integration-tests/utils/assertions.ts#L35
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) }
(92 matching properties omitted from actual)
- Expected
+ Received
@@ -1,12 +1,36 @@
{
"event_id": Any<String>,
- "spans": ArrayContaining [
- ObjectContaining {
- "data": ObjectContaining {
- "gen_ai.system_instructions": "[{\"type\":\"text\",\"content\":\"You are a helpful assistant\"}]",
+ "spans": [
+ {
+ "data": {
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 34267,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 34267,
+ "url": "http://localhost:34267/anthropic/v1/messages",
+ "url.full": "http://localhost:34267/anthropic/v1/messages",
+ "url.path": "/anthropic/v1/messages",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "Anthropic/JS 0.63.0",
},
+ "description": "POST http://localhost:34267/anthropic/v1/messages",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "aab86853c3a364ca",
+ "span_id": "79710360a119c500",
+ "start_timestamp": 1775216648.196,
+ "status": "ok",
+ "timestamp": 1775216648.2353506,
+ "trace_id": "b513c3b8e0a3832c83c823ac170a06e8",
},
],
"start_timestamp": Anything,
"timestamp": Anything,
"transaction": "main",
❯ assertSentryTransaction utils/assertions.ts:35:18
❯ expectTransactionEvent utils/runner.ts:748:5
❯ newEnvelope utils/runner.ts:514:15
❯ tryParseEnvelopeFromStdoutLine utils/runner.ts:633:15
❯ Socket.<anonymous> utils/runner.ts:651:15
|
|
Run integration tests:
dev-packages/node-integration-tests/utils/runner.ts#L503
Error: Expected envelope item type 'event' but got 'transaction'.
Item: [{"type":"transaction"},{"contexts":{"trace":{"span_id":"ee1199c02e7a8912","trace_id":"6310e7464d06920043572ada260e7050","data":{"sentry.source":"custom","sentry.sample_rate":1,"sentry.op":"function","sentry.origin":"manual"},"origin":"manual","op":"function","status":"ok"},"otel":{"resource":{"service.name":"node","service.namespace":"sentry","service.version":"10.47.0","telemetry.sdk.language":"nodejs","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"2.6.1"}},"runtime":{"name":"node","version":"v22.22.1"},"app":{"app_start_time":"2026-04-03T11:43:58.595Z","app_memory":122138624,"free_memory":14705856512},"os":{"kernel_version":"6.17.0-1008-azure","name":"Ubuntu Linux","version":"24.04"},"device":{"boot_time":"2026-04-03T11:42:33.327Z","arch":"x64","memory_size":16765399040,"free_memory":14705856512,"processor_count":4,"cpu_description":"Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz","processor_frequency":3492},"culture":{"locale":"en-US","timezone":"UTC"},"cloud_resource":{}},"spans":[{"span_id":"e64c6f54b889e1ba","trace_id":"6310e7464d06920043572ada260e7050","data":{"sentry.origin":"auto.http.otel.node_fetch","sentry.op":"http.client","http.request.method":"POST","http.request.method_original":"POST","url.full":"http://localhost:41359/anthropic/v1/messages","url.path":"/anthropic/v1/messages","url.query":"","url.scheme":"http","server.address":"localhost","server.port":41359,"user_agent.original":"Anthropic/JS 0.63.0","network.peer.address":"::1","network.peer.port":41359,"http.response.status_code":200,"url":"http://localhost:41359/anthropic/v1/messages","otel.kind":"CLIENT"},"description":"POST http://localhost:41359/anthropic/v1/messages","parent_span_id":"ee1199c02e7a8912","start_timestamp":1775216639.045,"timestamp":1775216639.096785,"status":"ok","op":"http.client","origin":"auto.http.otel.node_fetch"},{"span_id":"4418d86d7c2c98d0","trace_id":"6310e7464d06920043572ada260e7050","data":{"sentry.origin":"auto.http.otel.node_fetch","sentry.op":"http.client","http.request.method":"POST","http.request.method_original":"POST","url.full":"http://localhost:41359/anthropic/v1/messages","url.path":"/anthropic/v1/messages","url.query":"","url.scheme":"http","server.address":"localhost","server.port":41359,"user_agent.original":"Anthropic/JS 0.63.0","network.peer.address":"::1","network.peer.port":41359,"http.response.status_code":404,"url":"http://localhost:41359/anthropic/v1/messages","otel.kind":"CLIENT"},"description":"POST http://localhost:41359/anthropic/v1/messages","parent_span_id":"ee1199c02e7a8912","start_timestamp":1775216639.103,"timestamp":1775216639.117201,"status":"not_found","op":"http.client","origin":"auto.http.otel.node_fetch"},{"span_id":"66e9b3d9e4a57fb8","trace_id":"6310e7464d06920043572ada260e7050","data":{"sentry.origin":"auto.http.otel.node_fetch","sentry.op":"http.client","http.request.method":"POST","http.request.method_original":"POST","url.full":"http://localhost:41359/anthropic/v1/messages/count_tokens","url.path":"/anthropic/v1/messages/count_tokens","url.query":"","url.scheme":"http","server.address":"localhost","server.port":41359,"user_agent.original":"Anthropic/JS 0.63.0","network.peer.address":"::1","network.peer.port":41359,"http.response.status_code":200,"url":"http://localhost:41359/anthropic/v1/messages/count_tokens","otel.kind":"CLIENT"},"description":"POST http://localhost:41359/anthropic/v1/messages/count_tokens","parent_span_id":"ee1199c02e7a8912","start_timestamp":1775216639.12,"timestamp":1775216639.1628866,"status":"ok","op":"http.client","origin":"auto.http.otel.node_fetch"},{"span_id":"ddc8e97c097ac761","trace_id":"6310e7464d06920043572ada260e7050","data":{"sentry.origin":"auto.http.otel.node_fetch","sentry.op":"http.client","http.request.method":"GET","http.request.method_original":"GET","url.full":"http://localhost:41359/anthropic/v1/models/claude-3-haiku-20240307","url.path":"/anthropic/v1/models/claude-3-haiku-20240307","url.query":"","url.scheme":"http","server.address":"localhost","serv
|
|
Run integration tests:
dev-packages/node-integration-tests/utils/runner.ts#L503
Error: Expected envelope item type 'event' but got 'transaction'.
Item: [{"type":"transaction"},{"contexts":{"trace":{"span_id":"2f82ff35eecda171","trace_id":"e9391c50530342a910c849551b7d12b1","data":{"sentry.source":"custom","sentry.sample_rate":1,"sentry.op":"function","sentry.origin":"manual"},"origin":"manual","op":"function","status":"ok"},"otel":{"resource":{"service.name":"node","service.namespace":"sentry","service.version":"10.47.0","telemetry.sdk.language":"nodejs","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"2.6.1"}},"runtime":{"name":"node","version":"v22.22.1"},"app":{"app_start_time":"2026-04-03T11:43:57.186Z","app_memory":109666304,"free_memory":14603558912},"os":{"kernel_version":"6.17.0-1008-azure","name":"Ubuntu Linux","version":"24.04"},"device":{"boot_time":"2026-04-03T11:42:33.331Z","arch":"x64","memory_size":16765399040,"free_memory":14603558912,"processor_count":4,"cpu_description":"Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz","processor_frequency":3453},"culture":{"locale":"en-US","timezone":"UTC"},"cloud_resource":{}},"spans":[{"span_id":"73d9249e302e2624","trace_id":"e9391c50530342a910c849551b7d12b1","data":{"sentry.origin":"auto.http.otel.node_fetch","sentry.op":"http.client","http.request.method":"POST","http.request.method_original":"POST","url.full":"http://localhost:36785/anthropic/v1/messages","url.path":"/anthropic/v1/messages","url.query":"","url.scheme":"http","server.address":"localhost","server.port":36785,"user_agent.original":"Anthropic/JS 0.63.0","network.peer.address":"::1","network.peer.port":36785,"http.response.status_code":200,"url":"http://localhost:36785/anthropic/v1/messages","otel.kind":"CLIENT"},"description":"POST http://localhost:36785/anthropic/v1/messages","parent_span_id":"2f82ff35eecda171","start_timestamp":1775216637.56,"timestamp":1775216637.6060143,"status":"ok","op":"http.client","origin":"auto.http.otel.node_fetch"},{"span_id":"45d43863dc4228af","trace_id":"e9391c50530342a910c849551b7d12b1","data":{"sentry.origin":"auto.http.otel.node_fetch","sentry.op":"http.client","http.request.method":"POST","http.request.method_original":"POST","url.full":"http://localhost:36785/anthropic/v1/messages","url.path":"/anthropic/v1/messages","url.query":"","url.scheme":"http","server.address":"localhost","server.port":36785,"user_agent.original":"Anthropic/JS 0.63.0","network.peer.address":"::1","network.peer.port":36785,"http.response.status_code":404,"url":"http://localhost:36785/anthropic/v1/messages","otel.kind":"CLIENT"},"description":"POST http://localhost:36785/anthropic/v1/messages","parent_span_id":"2f82ff35eecda171","start_timestamp":1775216637.61,"timestamp":1775216637.6166325,"status":"not_found","op":"http.client","origin":"auto.http.otel.node_fetch"},{"span_id":"2a465906638aca25","trace_id":"e9391c50530342a910c849551b7d12b1","data":{"sentry.origin":"auto.http.otel.node_fetch","sentry.op":"http.client","http.request.method":"POST","http.request.method_original":"POST","url.full":"http://localhost:36785/anthropic/v1/messages/count_tokens","url.path":"/anthropic/v1/messages/count_tokens","url.query":"","url.scheme":"http","server.address":"localhost","server.port":36785,"user_agent.original":"Anthropic/JS 0.63.0","network.peer.address":"::1","network.peer.port":36785,"http.response.status_code":200,"url":"http://localhost:36785/anthropic/v1/messages/count_tokens","otel.kind":"CLIENT"},"description":"POST http://localhost:36785/anthropic/v1/messages/count_tokens","parent_span_id":"2f82ff35eecda171","start_timestamp":1775216637.618,"timestamp":1775216637.6403213,"status":"ok","op":"http.client","origin":"auto.http.otel.node_fetch"},{"span_id":"9c2ee966554d5177","trace_id":"e9391c50530342a910c849551b7d12b1","data":{"sentry.origin":"auto.http.otel.node_fetch","sentry.op":"http.client","http.request.method":"GET","http.request.method_original":"GET","url.full":"http://localhost:36785/anthropic/v1/models/claude-3-haiku-20240307","url.path":"/anthropic/v1/models/claude-3-haiku-20240307","url.query":"","url.scheme":"http","server.address":"localhost","ser
|
|
Run integration tests:
dev-packages/node-integration-tests/utils/runner.ts#L503
Error: Expected envelope item type 'event' but got 'transaction'.
Item: [{"type":"transaction"},{"contexts":{"trace":{"span_id":"ca73a63b7d0f7793","trace_id":"02f6e36b4e6dc46367cfaa566804f483","data":{"sentry.source":"custom","sentry.sample_rate":1,"sentry.op":"function","sentry.origin":"manual"},"origin":"manual","op":"function","status":"ok"},"otel":{"resource":{"service.name":"node","service.namespace":"sentry","service.version":"10.47.0","telemetry.sdk.language":"nodejs","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"2.6.1"}},"runtime":{"name":"node","version":"v22.22.1"},"app":{"app_start_time":"2026-04-03T11:43:55.576Z","app_memory":114700288,"free_memory":14608277504},"os":{"kernel_version":"6.17.0-1008-azure","name":"Ubuntu Linux","version":"24.04"},"device":{"boot_time":"2026-04-03T11:42:33.330Z","arch":"x64","memory_size":16765399040,"free_memory":14608277504,"processor_count":4,"cpu_description":"Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz","processor_frequency":3383},"culture":{"locale":"en-US","timezone":"UTC"},"cloud_resource":{}},"spans":[{"span_id":"e899dd714ce2706c","trace_id":"02f6e36b4e6dc46367cfaa566804f483","data":{"sentry.origin":"auto.http.otel.node_fetch","sentry.op":"http.client","http.request.method":"POST","http.request.method_original":"POST","url.full":"http://localhost:37313/anthropic/v1/messages","url.path":"/anthropic/v1/messages","url.query":"","url.scheme":"http","server.address":"localhost","server.port":37313,"user_agent.original":"Anthropic/JS 0.63.0","network.peer.address":"::1","network.peer.port":37313,"http.response.status_code":200,"url":"http://localhost:37313/anthropic/v1/messages","otel.kind":"CLIENT"},"description":"POST http://localhost:37313/anthropic/v1/messages","parent_span_id":"ca73a63b7d0f7793","start_timestamp":1775216636.085,"timestamp":1775216636.1397183,"status":"ok","op":"http.client","origin":"auto.http.otel.node_fetch"},{"span_id":"d9b33b0c5d213c53","trace_id":"02f6e36b4e6dc46367cfaa566804f483","data":{"sentry.origin":"auto.http.otel.node_fetch","sentry.op":"http.client","http.request.method":"POST","http.request.method_original":"POST","url.full":"http://localhost:37313/anthropic/v1/messages","url.path":"/anthropic/v1/messages","url.query":"","url.scheme":"http","server.address":"localhost","server.port":37313,"user_agent.original":"Anthropic/JS 0.63.0","network.peer.address":"::1","network.peer.port":37313,"http.response.status_code":404,"url":"http://localhost:37313/anthropic/v1/messages","otel.kind":"CLIENT"},"description":"POST http://localhost:37313/anthropic/v1/messages","parent_span_id":"ca73a63b7d0f7793","start_timestamp":1775216636.146,"timestamp":1775216636.160357,"status":"not_found","op":"http.client","origin":"auto.http.otel.node_fetch"},{"span_id":"b487aaf4a2734714","trace_id":"02f6e36b4e6dc46367cfaa566804f483","data":{"sentry.origin":"auto.http.otel.node_fetch","sentry.op":"http.client","http.request.method":"POST","http.request.method_original":"POST","url.full":"http://localhost:37313/anthropic/v1/messages/count_tokens","url.path":"/anthropic/v1/messages/count_tokens","url.query":"","url.scheme":"http","server.address":"localhost","server.port":37313,"user_agent.original":"Anthropic/JS 0.63.0","network.peer.address":"::1","network.peer.port":37313,"http.response.status_code":200,"url":"http://localhost:37313/anthropic/v1/messages/count_tokens","otel.kind":"CLIENT"},"description":"POST http://localhost:37313/anthropic/v1/messages/count_tokens","parent_span_id":"ca73a63b7d0f7793","start_timestamp":1775216636.163,"timestamp":1775216636.202871,"status":"ok","op":"http.client","origin":"auto.http.otel.node_fetch"},{"span_id":"d032968ee52cec2e","trace_id":"02f6e36b4e6dc46367cfaa566804f483","data":{"sentry.origin":"auto.http.otel.node_fetch","sentry.op":"http.client","http.request.method":"GET","http.request.method_original":"GET","url.full":"http://localhost:37313/anthropic/v1/models/claude-3-haiku-20240307","url.path":"/anthropic/v1/models/claude-3-haiku-20240307","url.query":"","url.scheme":"http","server.address":"localhost","ser
|
|
Run integration tests:
dev-packages/node-integration-tests/utils/assertions.ts#L35
AssertionError: expected { contexts: { …(8) }, …(14) } to match object { event_id: Any<String>, …(5) }
(92 matching properties omitted from actual)
- Expected
+ Received
@@ -1,37 +1,94 @@
{
"event_id": Any<String>,
- "spans": ArrayContaining [
- ObjectContaining {
- "data": ObjectContaining {
- "gen_ai.operation.name": "chat",
- "gen_ai.request.model": "claude-3-haiku-20240307",
- "gen_ai.response.id": "msg_withresponse",
+ "spans": [
+ {
+ "data": {
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 40631,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 40631,
+ "url": "http://localhost:40631/anthropic/v1/messages",
+ "url.full": "http://localhost:40631/anthropic/v1/messages",
+ "url.path": "/anthropic/v1/messages",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "Anthropic/JS 0.63.0",
},
- "description": "chat claude-3-haiku-20240307",
- "op": "gen_ai.chat",
+ "description": "POST http://localhost:40631/anthropic/v1/messages",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "f480157f245328a8",
+ "span_id": "7b55bbb731c49f04",
+ "start_timestamp": 1775216634.487,
"status": "ok",
+ "timestamp": 1775216634.5308502,
+ "trace_id": "ac5e88f98b2150064186d0cdef86724a",
},
- ObjectContaining {
- "data": ObjectContaining {
- "gen_ai.operation.name": "chat",
- "gen_ai.request.model": "claude-3-haiku-20240307",
- "gen_ai.response.id": "msg_withresponse",
+ {
+ "data": {
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 40631,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 40631,
+ "url": "http://localhost:40631/anthropic/v1/messages",
+ "url.full": "http://localhost:40631/anthropic/v1/messages",
+ "url.path": "/anthropic/v1/messages",
+ "url.query": "",
+ "url.scheme": "http",
+ "user_agent.original": "Anthropic/JS 0.63.0",
},
- "description": "chat claude-3-haiku-20240307",
- "op": "gen_ai.chat",
+ "description": "POST http://localhost:40631/anthropic/v1/messages",
+ "op": "http.client",
+ "origin": "auto.http.otel.node_fetch",
+ "parent_span_id": "f480157f245328a8",
+ "span_id": "4833e5cf2bfa7ef0",
+ "start_timestamp": 1775216634.534,
"status": "ok",
+ "timestamp": 1775216634.5448685,
+ "trace_id": "ac5e88f98b2150064186d0cdef86724a",
},
- ObjectContaining {
- "data": ObjectContaining {
- "gen_ai.operation.name": "chat",
- "gen_ai.request.model": "claude-3-haiku-20240307",
- "gen_ai.response.id": "msg_stream_withresponse",
+ {
+ "data": {
+ "http.request.method": "POST",
+ "http.request.method_original": "POST",
+ "http.response.status_code": 200,
+ "network.peer.address": "::1",
+ "network.peer.port": 40631,
+ "otel.kind": "CLIENT",
+ "sentry.op": "http.client",
+ "sentry.origin": "auto.http.otel.node_fetch",
+ "server.address": "localhost",
+ "server.port": 40631,
+ "url": "http://localhost:40631/anthropic/v1/messages",
+ "url.full": "http://localhost:40631/anthropic/v1/messages",
+ "url.path": "/anthropic/v1/messages",
+ "url.query": "",
+ "url.scheme": "http"
|
|
Complete job
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/cache/restore@v4, actions/download-artifact@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Parse and Upload Coverage
Supported formats: clover, cobertura, jacoco, lcov, istanbul, go, codecov
|
|
Parse and Upload Coverage
No coverage files found
|
|
Parse and Upload Coverage
Please ensure your test framework is generating JUnit XML output.
|
|
Parse and Upload Coverage
No JUnit XML files found matching pattern: dev-packages/node-integration-tests/**/*.junit.xml
|
|
Parse and Upload Coverage
No files found matching pattern: dev-packages/node-integration-tests/**/*.junit.xml
|
Loading