Remove tx from segment #5525
ci-workflow.yml
on: pull_request
should_run
8s
Matrix: integration
Matrix: unit
Matrix: versioned-internal
Matrix: ci
Matrix: lint
Matrix: versioned-external
Matrix: codecov
all-clear
0s
Annotations
53 errors, 10 warnings, and 13 notices
lint (lts/*):
lib/llm-events/openai/chat-completion-message.js#L10
Replace `·agent,·segment,·request·=·{},·response·=·{},·index·=·0,·message,·completionId,·transaction` with `⏎····agent,⏎····segment,⏎····request·=·{},⏎····response·=·{},⏎····index·=·0,⏎····message,⏎····completionId,⏎····transaction⏎·`
|
lint (lts/*):
lib/transaction/trace/index.js#L168
Block must not be padded by blank lines
|
lint (lts/*):
lib/transaction/trace/index.js#L169
Replace `⏎}⏎` with `}`
|
lint (lts/*):
lib/transaction/tracer/index.js#L108
Replace `·config:·this.agent.config,·name,·collect,·traceStacks:·transaction.traceStacks,·root:·transaction.trace.root` with `⏎····config:·this.agent.config,⏎····name,⏎····collect,⏎····traceStacks:·transaction.traceStacks,⏎····root:·transaction.trace.root⏎·`
|
|
lint (lts/*):
test/unit/instrumentation/http/http.test.js#L23
Replace `·config:·agent.config,·name:·'base-segment',·root:·transaction.trace.root,·traceStacks:·transaction.traceStacks` with `⏎····config:·agent.config,⏎····name:·'base-segment',⏎····root:·transaction.trace.root,⏎····traceStacks:·transaction.traceStacks⏎·`
|
lint (lts/*):
test/unit/instrumentation/http/outbound.test.js#L27
Replace `·config:·agent.config,·name:·'base-segment',·traceStacks:·transaction.traceStacks,·root:·transaction.trace.root` with `⏎····config:·agent.config,⏎····name:·'base-segment',⏎····traceStacks:·transaction.traceStacks,⏎····root:·transaction.trace.root⏎·`
|
|
lint (lts/*):
test/unit/llm-events/openai/embedding.test.js#L35
Replace `·agent,·segment,·transaction:·tx,·request:·req,·response:·res` with `⏎········agent,⏎········segment,⏎········transaction:·tx,⏎········request:·req,⏎········response:·res⏎·····`
|
lint (lts/*):
test/unit/metrics-recorder/http-external.test.js#L113
Replace `'/child2',·generateRecorder('oauth.facebook.com',·'http'),·parent` with `⏎······'/child2',⏎······generateRecorder('oauth.facebook.com',·'http'),⏎······parent⏎····`
|
should not accept invalid trace context traceparent header:
test/unit/transaction.test.js#L1234
Error [ERR_TEST_FAILURE]: '00-41e0e173ca03d0eaac785bcf86d54be6-c1a3eb26392493e4-01' == '00-41e0e173ca03d0eaac785bcf86d54be6-1e4e7d2675f46bdf-01'
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1213:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: '00-41e0e173ca03d0eaac785bcf86d54be6-c1a3eb26392493e4-01' == '00-41e0e173ca03d0eaac785bcf86d54be6-1e4e7d2675f46bdf-01'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1234:14
at /home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:296:12
at AsyncLocalStorage.run (node:async_hooks:346:14)
at AsyncLocalContextManager.runInContext (/home/runner/work/node-newrelic/node-newrelic/lib/context-manager/async-local-context-manager.js:70:38)
at wrapped (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:252:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:213:50)
at Object.helper.runInTransaction (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:297:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1215:12)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:776:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '00-41e0e173ca03d0eaac785bcf86d54be6-c1a3eb26392493e4-01',
expected: '00-41e0e173ca03d0eaac785bcf86d54be6-1e4e7d2675f46bdf-01',
operator: '=='
}
}
|
should not accept invalid trace context traceparent header:
test/unit/transaction.test.js#L1602
Error [ERR_TEST_FAILURE]: '00-97ab713c90090afd2a82d9d451da7f01-5431e2ef5b74ee47-01' == '00-97ab713c90090afd2a82d9d451da7f01-2c6632c388da0186-01'
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1583:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: '00-97ab713c90090afd2a82d9d451da7f01-5431e2ef5b74ee47-01' == '00-97ab713c90090afd2a82d9d451da7f01-2c6632c388da0186-01'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1602:14
at /home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:296:12
at AsyncLocalStorage.run (node:async_hooks:346:14)
at AsyncLocalContextManager.runInContext (/home/runner/work/node-newrelic/node-newrelic/lib/context-manager/async-local-context-manager.js:70:38)
at wrapped (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:252:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:213:50)
at Object.helper.runInTransaction (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:297:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1589:12)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:776:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '00-97ab713c90090afd2a82d9d451da7f01-5431e2ef5b74ee47-01',
expected: '00-97ab713c90090afd2a82d9d451da7f01-2c6632c388da0186-01',
operator: '=='
}
}
|
should add finalized via rule transaction name to active span intrinsics:
test/unit/transaction.test.js#L1846
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'distributed_tracing')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1840:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'distributed_tracing')
at TraceSegment.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:78:36)
at Tracer.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:75:43)
at Transaction._copyNameToActiveSpan (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:472:41)
at Transaction.finalizeNameFromUri (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:438:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1846:9)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:789:25)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1840:3)
at Test.run (node:internal/test_runner/test:790:9)
}
|
when namestate populated, should add finalized via rule transaction name to active span intrinsics:
test/unit/transaction.test.js#L1886
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'distributed_tracing')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1878:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'distributed_tracing')
at TraceSegment.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:78:36)
at Tracer.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:75:43)
at Transaction._copyNameToActiveSpan (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:472:41)
at Transaction.finalizeNameFromUri (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:438:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1886:11)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:789:25)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1878:3)
at Test.run (node:internal/test_runner/test:790:9)
}
|
when namestate populated should copy parameters from the name stack:
test/unit/transaction.test.js#L1951
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'distributed_tracing')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1945:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'distributed_tracing')
at TraceSegment.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:78:36)
at Tracer.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:75:43)
at Transaction._copyNameToActiveSpan (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:472:41)
at Transaction.finalizeNameFromUri (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:438:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1951:9)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:789:25)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1945:3)
at Test.run (node:internal/test_runner/test:790:9)
}
|
should add finalized transaction name to active span intrinsics:
test/unit/transaction.test.js#L2019
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'distributed_tracing')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:2015:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'distributed_tracing')
at TraceSegment.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:78:36)
at Tracer.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:75:43)
at Transaction._copyNameToActiveSpan (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:472:41)
at Transaction.finalizeName (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:546:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:2019:9)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:789:25)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:2015:3)
at Test.run (node:internal/test_runner/test:790:9)
}
|
should notice if the errorware errors:
test/unit/shim/webframework-shim.test.js#L936
Error [ERR_TEST_FAILURE]: [Error: foobar] == [Error: errorware error]
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/webframework-shim.test.js:915:5)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/webframework-shim.test.js:456:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: [Error: foobar] == [Error: errorware error]
at /home/runner/work/node-newrelic/node-newrelic/test/unit/shim/webframework-shim.test.js:936:20
at /home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:296:12
at AsyncLocalStorage.run (node:async_hooks:346:14)
at AsyncLocalContextManager.runInContext (/home/runner/work/node-newrelic/node-newrelic/lib/context-manager/async-local-context-manager.js:70:38)
at wrapped (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:252:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:213:50)
at Object.helper.runInTransaction (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:297:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/webframework-shim.test.js:925:14)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:776:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: {},
expected: {},
operator: '=='
}
}
|
Should record the error when in a transaction:
test/unit/instrumentation/nest.test.js#L58
Error [ERR_TEST_FAILURE]: there should be one error
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/nest.test.js:33:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: there should be one error
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/nest.test.js:58:14
at /home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:296:12
at AsyncLocalStorage.run (node:async_hooks:346:14)
at AsyncLocalContextManager.runInContext (/home/runner/work/node-newrelic/node-newrelic/lib/context-manager/async-local-context-manager.js:70:38)
at wrapped (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:252:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:213:50)
at Object.helper.runInTransaction (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:297:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/nest.test.js:39:12)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:776:21) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: 0,
expected: 1,
operator: '=='
}
}
|
should be bound to a Trace:
test/unit/transaction/trace/segment.test.js#L31
Error [ERR_TEST_FAILURE]: null == <ref *4> Transaction {
_intrinsicAttributes: [Object: null prototype] {},
_partialName: null,
_recorders: [],
_traceId: null,
acceptedDistributedTrace: null,
agent: <ref *2> Agent {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
__created: Error: Only one agent at a time! This one was created at:
at Object.loadMockedAgent (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:106:22)
at TestContext.beforeEach (/home/runner/work/node-newreli...
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:31:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: null == <ref *4> Transaction {
_intrinsicAttributes: [Object: null prototype] {},
_partialName: null,
_recorders: [],
_traceId: null,
acceptedDistributedTrace: null,
agent: <ref *2> Agent {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
__created: Error: Only one agent at a time! This one was created at:
at Object.loadMockedAgent (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:106:22)
at TestContext.beforeEach (/home/runner/work/node-newreli...
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:44:12)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:789:25)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:31:3)
at Test.run (node:internal/test_runner/test:790:9)
at Test.processPendingSubtests (node:internal/test_runner/test:517:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: null,
expected: [Transaction],
operator: '=='
}
}
|
accepts a callback that records metrics for this segment:
test/unit/transaction/trace/segment.test.js#L127
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'probe')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:123:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'probe')
at TraceSegment.probe (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:125:20)
at new TraceSegment (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:73:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:127:21)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:776:21)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:123:3)
at Test.run (node:internal/test_runner/test:790:9)
at Test.processPendingSubtests (node:internal/test_runner/test:517:7)
}
|
should not accept invalid trace context traceparent header:
test/unit/transaction.test.js#L1234
Error [ERR_TEST_FAILURE]: '00-3272ceed973454102fdaf1e5a5ac7ba7-fa37206de9914f69-01' == '00-3272ceed973454102fdaf1e5a5ac7ba7-be46e31df9eda1f0-01'
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1213:3) {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: '00-3272ceed973454102fdaf1e5a5ac7ba7-fa37206de9914f69-01' == '00-3272ceed973454102fdaf1e5a5ac7ba7-be46e31df9eda1f0-01'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1234:14
at /home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:296:12
at AsyncLocalStorage.run (node:async_hooks:338:14)
at AsyncLocalContextManager.runInContext (/home/runner/work/node-newrelic/node-newrelic/lib/context-manager/async-local-context-manager.js:70:38)
at wrapped (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:252:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:213:50)
at Object.helper.runInTransaction (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:297:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1215:12)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:618:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '00-3272ceed973454102fdaf1e5a5ac7ba7-fa37206de9914f69-01',
expected: '00-3272ceed973454102fdaf1e5a5ac7ba7-be46e31df9eda1f0-01',
operator: '=='
},
code: 'ERR_TEST_FAILURE'
}
|
should not accept invalid trace context traceparent header:
test/unit/transaction.test.js#L1602
Error [ERR_TEST_FAILURE]: '00-6f2a1a6c8244516ea5472ed1b5323ee4-fcbc1d484cd7030e-01' == '00-6f2a1a6c8244516ea5472ed1b5323ee4-c6c7cfd6a41d47e0-01'
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1583:3) {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: '00-6f2a1a6c8244516ea5472ed1b5323ee4-fcbc1d484cd7030e-01' == '00-6f2a1a6c8244516ea5472ed1b5323ee4-c6c7cfd6a41d47e0-01'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1602:14
at /home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:296:12
at AsyncLocalStorage.run (node:async_hooks:338:14)
at AsyncLocalContextManager.runInContext (/home/runner/work/node-newrelic/node-newrelic/lib/context-manager/async-local-context-manager.js:70:38)
at wrapped (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:252:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:213:50)
at Object.helper.runInTransaction (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:297:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1589:12)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:618:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '00-6f2a1a6c8244516ea5472ed1b5323ee4-fcbc1d484cd7030e-01',
expected: '00-6f2a1a6c8244516ea5472ed1b5323ee4-c6c7cfd6a41d47e0-01',
operator: '=='
},
code: 'ERR_TEST_FAILURE'
}
|
should add finalized via rule transaction name to active span intrinsics:
test/unit/transaction.test.js#L1846
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'distributed_tracing')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1840:3) {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'distributed_tracing')
at TraceSegment.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:78:36)
at Tracer.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:75:43)
at Transaction._copyNameToActiveSpan (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:472:41)
at Transaction.finalizeNameFromUri (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:438:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1846:9)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:631:25)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1840:3)
at Test.run (node:internal/test_runner/test:632:9),
code: 'ERR_TEST_FAILURE'
}
|
when namestate populated, should add finalized via rule transaction name to active span intrinsics:
test/unit/transaction.test.js#L1886
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'distributed_tracing')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1878:3) {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'distributed_tracing')
at TraceSegment.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:78:36)
at Tracer.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:75:43)
at Transaction._copyNameToActiveSpan (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:472:41)
at Transaction.finalizeNameFromUri (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:438:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1886:11)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:631:25)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1878:3)
at Test.run (node:internal/test_runner/test:632:9),
code: 'ERR_TEST_FAILURE'
}
|
when namestate populated should copy parameters from the name stack:
test/unit/transaction.test.js#L1951
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'distributed_tracing')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1945:3) {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'distributed_tracing')
at TraceSegment.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:78:36)
at Tracer.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:75:43)
at Transaction._copyNameToActiveSpan (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:472:41)
at Transaction.finalizeNameFromUri (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:438:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1951:9)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:631:25)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1945:3)
at Test.run (node:internal/test_runner/test:632:9),
code: 'ERR_TEST_FAILURE'
}
|
should add finalized transaction name to active span intrinsics:
test/unit/transaction.test.js#L2019
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'distributed_tracing')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:2015:3) {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'distributed_tracing')
at TraceSegment.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:78:36)
at Tracer.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:75:43)
at Transaction._copyNameToActiveSpan (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:472:41)
at Transaction.finalizeName (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:546:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:2019:9)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:631:25)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:2015:3)
at Test.run (node:internal/test_runner/test:632:9),
code: 'ERR_TEST_FAILURE'
}
|
should notice if the errorware errors:
test/unit/shim/webframework-shim.test.js#L936
Error [ERR_TEST_FAILURE]: [Error: foobar] == [Error: errorware error]
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/webframework-shim.test.js:915:5)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/webframework-shim.test.js:456:3) {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: [Error: foobar] == [Error: errorware error]
at /home/runner/work/node-newrelic/node-newrelic/test/unit/shim/webframework-shim.test.js:936:20
at /home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:296:12
at AsyncLocalStorage.run (node:async_hooks:338:14)
at AsyncLocalContextManager.runInContext (/home/runner/work/node-newrelic/node-newrelic/lib/context-manager/async-local-context-manager.js:70:38)
at wrapped (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:252:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:213:50)
at Object.helper.runInTransaction (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:297:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/webframework-shim.test.js:925:14)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:618:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: {},
expected: {},
operator: '=='
},
code: 'ERR_TEST_FAILURE'
}
|
Should record the error when in a transaction:
test/unit/instrumentation/nest.test.js#L58
Error [ERR_TEST_FAILURE]: there should be one error
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/nest.test.js:33:3) {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: there should be one error
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/nest.test.js:58:14
at /home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:296:12
at AsyncLocalStorage.run (node:async_hooks:338:14)
at AsyncLocalContextManager.runInContext (/home/runner/work/node-newrelic/node-newrelic/lib/context-manager/async-local-context-manager.js:70:38)
at wrapped (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:252:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:213:50)
at Object.helper.runInTransaction (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:297:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/nest.test.js:39:12)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:618:21) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: 0,
expected: 1,
operator: '=='
},
code: 'ERR_TEST_FAILURE'
}
|
should be bound to a Trace:
test/unit/transaction/trace/segment.test.js#L31
Error [ERR_TEST_FAILURE]: null == <ref *4> Transaction {
_intrinsicAttributes: [Object: null prototype] {},
_partialName: null,
_recorders: [],
_traceId: null,
acceptedDistributedTrace: null,
agent: <ref *2> Agent {
[Symbol(kCapture)]: false,
__created: Error: Only one agent at a time! This one was created at:
at Object.loadMockedAgent (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:106:22)
at TestContext.beforeEach (/home/runner/work/node-newrelic/node-newrelic/test/unit/transa...
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:31:3) {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: null == <ref *4> Transaction {
_intrinsicAttributes: [Object: null prototype] {},
_partialName: null,
_recorders: [],
_traceId: null,
acceptedDistributedTrace: null,
agent: <ref *2> Agent {
[Symbol(kCapture)]: false,
__created: Error: Only one agent at a time! This one was created at:
at Object.loadMockedAgent (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:106:22)
at TestContext.beforeEach (/home/runner/work/node-newrelic/node-newrelic/test/unit/transa...
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:44:12)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:631:25)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:31:3)
at Test.run (node:internal/test_runner/test:632:9)
at startSubtest (node:internal/test_runner/harness:214:3) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: null,
expected: [Transaction],
operator: '=='
},
code: 'ERR_TEST_FAILURE'
}
|
accepts a callback that records metrics for this segment:
test/unit/transaction/trace/segment.test.js#L127
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'probe')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:123:3) {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'probe')
at TraceSegment.probe (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:125:20)
at new TraceSegment (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:73:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:127:21)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:618:21)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:123:3)
at Test.run (node:internal/test_runner/test:632:9)
at startSubtest (node:internal/test_runner/harness:214:3),
code: 'ERR_TEST_FAILURE'
}
|
should not accept invalid trace context traceparent header:
test/unit/transaction.test.js#L1234
Error [ERR_TEST_FAILURE]: '00-58f58cd32627dcc2b1dd72c8ca24976f-84447803c7d5ab13-01' == '00-58f58cd32627dcc2b1dd72c8ca24976f-26367cb4b6997ff3-01'
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1213:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: '00-58f58cd32627dcc2b1dd72c8ca24976f-84447803c7d5ab13-01' == '00-58f58cd32627dcc2b1dd72c8ca24976f-26367cb4b6997ff3-01'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1234:14
at /home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:296:12
at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
at AsyncLocalContextManager.runInContext (/home/runner/work/node-newrelic/node-newrelic/lib/context-manager/async-local-context-manager.js:70:38)
at wrapped (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:252:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:213:50)
at Object.helper.runInTransaction (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:297:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1215:12)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:917:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '00-58f58cd32627dcc2b1dd72c8ca24976f-84447803c7d5ab13-01',
expected: '00-58f58cd32627dcc2b1dd72c8ca24976f-26367cb4b6997ff3-01',
operator: '=='
}
}
|
should not accept invalid trace context traceparent header:
test/unit/transaction.test.js#L1602
Error [ERR_TEST_FAILURE]: '00-570028c134ac4f900dc673567f9bf279-323402f72ea78df1-01' == '00-570028c134ac4f900dc673567f9bf279-9f62ac7f2e771691-01'
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1583:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: '00-570028c134ac4f900dc673567f9bf279-323402f72ea78df1-01' == '00-570028c134ac4f900dc673567f9bf279-9f62ac7f2e771691-01'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1602:14
at /home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:296:12
at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
at AsyncLocalContextManager.runInContext (/home/runner/work/node-newrelic/node-newrelic/lib/context-manager/async-local-context-manager.js:70:38)
at wrapped (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:252:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:213:50)
at Object.helper.runInTransaction (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:297:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1589:12)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:917:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '00-570028c134ac4f900dc673567f9bf279-323402f72ea78df1-01',
expected: '00-570028c134ac4f900dc673567f9bf279-9f62ac7f2e771691-01',
operator: '=='
}
}
|
should add finalized via rule transaction name to active span intrinsics:
test/unit/transaction.test.js#L1846
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'distributed_tracing')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1840:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'distributed_tracing')
at TraceSegment.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:78:36)
at Tracer.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:75:43)
at Transaction._copyNameToActiveSpan (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:472:41)
at Transaction.finalizeNameFromUri (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:438:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1846:9)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:930:25)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1840:3)
at Test.run (node:internal/test_runner/test:931:9)
}
|
when namestate populated, should add finalized via rule transaction name to active span intrinsics:
test/unit/transaction.test.js#L1886
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'distributed_tracing')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1878:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'distributed_tracing')
at TraceSegment.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:78:36)
at Tracer.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:75:43)
at Transaction._copyNameToActiveSpan (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:472:41)
at Transaction.finalizeNameFromUri (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:438:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1886:11)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:930:25)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1878:3)
at Test.run (node:internal/test_runner/test:931:9)
}
|
when namestate populated should copy parameters from the name stack:
test/unit/transaction.test.js#L1951
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'distributed_tracing')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1945:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'distributed_tracing')
at TraceSegment.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:78:36)
at Tracer.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:75:43)
at Transaction._copyNameToActiveSpan (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:472:41)
at Transaction.finalizeNameFromUri (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:438:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1951:9)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:930:25)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:1945:3)
at Test.run (node:internal/test_runner/test:931:9)
}
|
should add finalized transaction name to active span intrinsics:
test/unit/transaction.test.js#L2019
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'distributed_tracing')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:2015:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'distributed_tracing')
at TraceSegment.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:78:36)
at Tracer.getSpanContext (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:75:43)
at Transaction._copyNameToActiveSpan (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:472:41)
at Transaction.finalizeName (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/index.js:546:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:2019:9)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:930:25)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction.test.js:2015:3)
at Test.run (node:internal/test_runner/test:931:9)
}
|
should notice if the errorware errors:
test/unit/shim/webframework-shim.test.js#L936
Error [ERR_TEST_FAILURE]: [Error: foobar] == [Error: errorware error]
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/webframework-shim.test.js:915:5)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/webframework-shim.test.js:456:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: [Error: foobar] == [Error: errorware error]
at /home/runner/work/node-newrelic/node-newrelic/test/unit/shim/webframework-shim.test.js:936:20
at /home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:296:12
at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
at AsyncLocalContextManager.runInContext (/home/runner/work/node-newrelic/node-newrelic/lib/context-manager/async-local-context-manager.js:70:38)
at wrapped (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:252:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:213:50)
at Object.helper.runInTransaction (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:297:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/webframework-shim.test.js:925:14)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:917:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: {},
expected: {},
operator: '=='
}
}
|
Should record the error when in a transaction:
test/unit/instrumentation/nest.test.js#L58
Error [ERR_TEST_FAILURE]: there should be one error
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/nest.test.js:33:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: there should be one error
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/nest.test.js:58:14
at /home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:296:12
at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
at AsyncLocalContextManager.runInContext (/home/runner/work/node-newrelic/node-newrelic/lib/context-manager/async-local-context-manager.js:70:38)
at wrapped (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:252:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:213:50)
at Object.helper.runInTransaction (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:297:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/nest.test.js:39:12)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:917:21) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: 0,
expected: 1,
operator: '=='
}
}
|
should be bound to a Trace:
test/unit/transaction/trace/segment.test.js#L31
Error [ERR_TEST_FAILURE]: null == <ref *4> Transaction {
_intrinsicAttributes: [Object: null prototype] {},
_partialName: null,
_recorders: [],
_traceId: null,
acceptedDistributedTrace: null,
agent: <ref *2> Agent {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
__created: Error: Only one agent at a time! This one was created at:
at Object.loadMockedAgent (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:106:22)
at TestContext.beforeEach (/home/runner/work/node-newreli...
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:31:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: null == <ref *4> Transaction {
_intrinsicAttributes: [Object: null prototype] {},
_partialName: null,
_recorders: [],
_traceId: null,
acceptedDistributedTrace: null,
agent: <ref *2> Agent {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
__created: Error: Only one agent at a time! This one was created at:
at Object.loadMockedAgent (/home/runner/work/node-newrelic/node-newrelic/test/lib/agent_helper.js:106:22)
at TestContext.beforeEach (/home/runner/work/node-newreli...
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:44:12)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:930:25)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:31:3)
at Test.run (node:internal/test_runner/test:931:9)
at startSubtestAfterBootstrap (node:internal/test_runner/harness:289:3) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: null,
expected: [Transaction],
operator: '=='
}
}
|
accepts a callback that records metrics for this segment:
test/unit/transaction/trace/segment.test.js#L127
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'probe')
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:123:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'probe')
at TraceSegment.probe (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:125:20)
at new TraceSegment (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/trace/segment.js:73:8)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:127:21)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:917:21)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:123:3)
at Test.run (node:internal/test_runner/test:931:9)
at startSubtestAfterBootstrap (node:internal/test_runner/harness:289:3)
}
|
test/integration/distributed-tracing/trace-context-cross-agent.tap.js:
test/integration/distributed-tracing/trace-context-cross-agent.tap.js#L1
[Error: test failed] { failureType: 'testCodeFailure', cause: 'test failed', code: 'ERR_TEST_FAILURE', exitCode: 1, signal: null }
|
integration (18.x)
Process completed with exit code 1.
|
test/integration/distributed-tracing/trace-context-cross-agent.tap.js:
test/integration/distributed-tracing/trace-context-cross-agent.tap.js#L1
[Error: test failed] { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: 'test failed', exitCode: 1, signal: null }
|
integration (20.x)
Process completed with exit code 1.
|
test/integration/distributed-tracing/trace-context-cross-agent.tap.js:
test/integration/distributed-tracing/trace-context-cross-agent.tap.js#L1
[Error: test failed] { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: 'test failed', exitCode: 1, signal: null }
|
integration (22.x)
Process completed with exit code 1.
|
versioned-external (18.x)
Process completed with exit code 4.
|
versioned-external (20.x)
Process completed with exit code 4.
|
versioned-external (22.x)
Process completed with exit code 4.
|
versioned-internal (22.x)
Process completed with exit code 4.
|
versioned-internal (20.x)
Process completed with exit code 4.
|
versioned-internal (18.x)
Process completed with exit code 4.
|
all-clear
Process completed with exit code 1.
|
lint (lts/*):
api.js#L1551
The type 'getTraceMetadata' is undefined
|
lint (lts/*):
api.js#L1905
Missing JSDoc @returns declaration
|
lint (lts/*):
bin/create-docs-pr.js#L124
Missing JSDoc @returns declaration
|
lint (lts/*):
bin/create-docs-pr.js#L173
Missing JSDoc @returns declaration
|
lint (lts/*):
bin/create-docs-pr.js#L205
Missing JSDoc @returns declaration
|
lint (lts/*):
bin/create-docs-pr.js#L311
Missing JSDoc @returns declaration
|
lint (lts/*):
lib/agent.js#L210
'config' is already declared in the upper scope on line 158 column 16
|
lint (lts/*):
lib/agent.js#L221
'config' is already declared in the upper scope on line 158 column 16
|
lint (lts/*):
lib/agent.js#L231
'config' is already declared in the upper scope on line 158 column 16
|
lint (lts/*):
lib/agent.js#L242
'config' is already declared in the upper scope on line 158 column 16
|
ci (lts/*)
Total Tests: 4
Suites 📂: 0
Passed ✅: 4
Failed ❌: 0
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 874.350ms
|
unit (20.x):
test/unit/util/code-level-metrics.test.js#L104
This is testing Express router.route which binds a function thus breaking any function metadata
|
unit (20.x):
test/unit/spans/batch-span-streamer.test.js#L199
this will simulate n full batches and the last batch being 1/3 full
|
unit (20.x)
Total Tests: 4399
Suites 📂: 0
Passed ✅: 4330
Failed ❌: 47
Canceled 🚫: 0
Skipped ⏭️: 3
Todo 📝: 19
Duration 🕐: 61863.975ms
|
unit (18.x):
test/unit/util/code-level-metrics.test.js#L104
This is testing Express router.route which binds a function thus breaking any function metadata
|
unit (18.x):
test/unit/spans/batch-span-streamer.test.js#L199
this will simulate n full batches and the last batch being 1/3 full
|
unit (18.x)
Total Tests: 4401
Suites 📂: 0
Passed ✅: 4335
Failed ❌: 47
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 19
Duration 🕐: 65806.492ms
|
unit (22.x):
test/unit/util/code-level-metrics.test.js#L104
This is testing Express router.route which binds a function thus breaking any function metadata
|
unit (22.x):
test/unit/spans/batch-span-streamer.test.js#L199
this will simulate n full batches and the last batch being 1/3 full
|
unit (22.x)
Total Tests: 4399
Suites 📂: 0
Passed ✅: 4330
Failed ❌: 47
Canceled 🚫: 0
Skipped ⏭️: 3
Todo 📝: 19
Duration 🕐: 73707.540ms
|
integration (18.x)
Total Tests: 66
Suites 📂: 0
Passed ✅: 65
Failed ❌: 1
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 135538.251ms
|
integration (20.x)
Total Tests: 66
Suites 📂: 0
Passed ✅: 65
Failed ❌: 1
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 147170.936ms
|
integration (22.x)
Total Tests: 66
Suites 📂: 0
Passed ✅: 65
Failed ❌: 1
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 175945.956ms
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
logs-18.x.tgz
|
415 KB |
|
logs-20.x.tgz
|
413 KB |
|
logs-22.x.tgz
|
391 KB |
|