feat: Removed transaction from segment #5532
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
59 errors, 10 warnings, and 13 notices
versioned-external (20.x)
Process completed with exit code 4.
|
versioned-external (22.x)
Process completed with exit code 4.
|
versioned-external (18.x)
Process completed with exit code 4.
|
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/*):
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⏎····`
|
lint (lts/*):
test/unit/shim/datastore-shim.test.js#L38
Replace `·config:·agent.config,·name:·'ChildSegment',·traceStacks:·transaction.traceStacks,·root:·transaction.trace.root` with `⏎··········config:·agent.config,⏎··········name:·'ChildSegment',⏎··········traceStacks:·transaction.traceStacks,⏎··········root:·transaction.trace.root⏎·······`
|
lint (lts/*):
test/unit/shim/message-shim.test.js#L47
Replace `·config:·agent.config,·name:·'ChildSegment',·traceStacks:·transaction.traceStacks,·root:·transaction.trace.root` with `⏎··········config:·agent.config,⏎··········name:·'ChildSegment',⏎··········traceStacks:·transaction.traceStacks,⏎··········root:·transaction.trace.root⏎·······`
|
|
should not require any arguments except a function:
test/unit/shim/shim.test.js#L430
Error [ERR_TEST_FAILURE]: TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attributes.incl... == null
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:430:5)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:363:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attributes.incl... == null
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:443:14)
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/shim/shim.test.js:430:5)
at Test.run (node:internal/test_runner/test:790:9)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:363: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: [TraceSegment],
expected: null,
operator: '=='
}
}
|
should not modify returned parent for opaque segments:
test/unit/shim/shim.test.js#L2372
Error [ERR_TEST_FAILURE]: <ref *179> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attr... == <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attrib...
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:2372:5)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:2300:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: <ref *179> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attr... == <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attrib...
at /home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:2383:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/shim.test.js:2374: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: [TraceSegment],
expected: [TraceSegment],
operator: '=='
}
}
|
should not add headers when segment is opaque:
test/unit/instrumentation/undici.test.js#L69
Error [ERR_TEST_FAILURE]: Expected values to be loosely deep-equal:
[
'Both DT and CAT are disabled, not adding headers!'
]
should loosely deep-equal
[
'Not capturing data for outbound request (%s) because parent segment opaque (%s)',
'/foo',
'parent'
]
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:61:13)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:
[
'Both DT and CAT are disabled, not adding headers!'
]
should loosely deep-equal
[
'Not capturing data for outbound request (%s) because parent segment opaque (%s)',
'/foo',
'parent'
]
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:69:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:62: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: [ 'Both DT and CAT are disabled, not adding headers!' ],
expected: [ 'Not capturing data for outbound request (%s) because parent segment opaque (%s)', '/foo', 'parent' ],
operator: 'deepEqual'
}
}
|
should get diff parent segment across diff async execution contexts:
test/unit/instrumentation/undici.test.js#L161
Error [ERR_TEST_FAILURE]: <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [
TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 4,
attributes: [Object: null prototype] {
hostname: {
destinations: 16,
... != <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [
TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 4,
attributes: [Object: null prototype] {
hostname: {
destinations: 16,
...
at process.emit (node:events:519:28)
at process.emit (/home/runner/work/node-newrelic/node-newrelic/node_modules/source-map-support/source-map-support.js:516:21)
at process.processEmit [as emit] (/home/runner/work/node-newrelic/node-newrelic/node_modules/libtap/node_modules/signal-exit/index.js:199:34) {
code: 'ERR_TEST_FAILURE',
failureType: 'unhandledRejection',
cause: AssertionError [ERR_ASSERTION]: <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [
TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 4,
attributes: [Object: null prototype] {
hostname: {
destinations: 16,
... != <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [
TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 4,
attributes: [Object: null prototype] {
hostname: {
destinations: 16,
...
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:173:20
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [TraceSegment],
expected: [TraceSegment],
operator: '!='
}
}
|
should get the parent segment shim when `undici_async_tracking` is false:
test/unit/instrumentation/undici.test.js#L195
Error [ERR_TEST_FAILURE]: parent segment should not be same
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:182:13)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: parent segment should not be same
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:195:18
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:186:16)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:776:21) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: 'ROOT',
expected: 'ROOT',
operator: '!='
}
}
|
should name segment with appropriate attrs based on request.path:
test/unit/instrumentation/undici.test.js#L224
Error [ERR_TEST_FAILURE]: 'ROOT' == 'External/unittesting.com/foo'
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:211:13)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: 'ROOT' == 'External/unittesting.com/foo'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:224:18
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:214:16)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:776:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'ROOT',
expected: 'External/unittesting.com/foo',
operator: '=='
}
}
|
should use proper url if http:
test/unit/instrumentation/undici.test.js#L246
Error [ERR_TEST_FAILURE]: 'ROOT' == 'External/unittesting.com/http'
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:236:13)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: 'ROOT' == 'External/unittesting.com/http'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:246:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:237: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: 'ROOT',
expected: 'External/unittesting.com/http',
operator: '=='
}
}
|
should use port in https if not 443:
test/unit/instrumentation/undici.test.js#L264
Error [ERR_TEST_FAILURE]: 'ROOT' == 'External/unittesting.com:9999/port-https'
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:254:13)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: 'ROOT' == 'External/unittesting.com:9999/port-https'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:264:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:255: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: 'ROOT',
expected: 'External/unittesting.com:9999/port-https',
operator: '=='
}
}
|
should use port in http if not 80:
test/unit/instrumentation/undici.test.js#L282
Error [ERR_TEST_FAILURE]: 'ROOT' == 'External/unittesting.com:8080/port-http'
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:272:13)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: 'ROOT' == 'External/unittesting.com:8080/port-http'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:282:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:273: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: 'ROOT',
expected: 'External/unittesting.com:8080/port-http',
operator: '=='
}
}
|
should end current segment and restore to parent:
test/unit/instrumentation/undici.test.js#L385
Error [ERR_TEST_FAILURE]: parentSegment should now the active
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:373:13)
at Test.runInAsyncScope (node:async_hooks:206:9)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:372:11) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: parentSegment should now the active
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:385:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:374:14)
at Test.runInAsyncScope (node:async_hooks:206:9)
at Test.run (node:internal/test_runner/test:776:21) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: 'fa728b5f2bd75f95',
expected: 'a6b95a7eef0fe25c',
operator: '=='
}
}
|
should not require any arguments except a function:
test/unit/shim/shim.test.js#L430
Error [ERR_TEST_FAILURE]: TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attributes.include': [Function: bound update],
... == null
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:430:5)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:363:3) {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attributes.include': [Function: bound update],
... == null
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:443:14)
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/shim/shim.test.js:430:5)
at Test.run (node:internal/test_runner/test:632:9)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:363: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: [TraceSegment],
expected: null,
operator: '=='
},
code: 'ERR_TEST_FAILURE'
}
|
should not modify returned parent for opaque segments:
test/unit/shim/shim.test.js#L2372
Error [ERR_TEST_FAILURE]: <ref *179> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attributes.include': [Function: boun... == <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attributes.include': [Function: bound ...
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:2372:5)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:2300:3) {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: <ref *179> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attributes.include': [Function: boun... == <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attributes.include': [Function: bound ...
at /home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:2383:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/shim.test.js:2374: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: [TraceSegment],
expected: [TraceSegment],
operator: '=='
},
code: 'ERR_TEST_FAILURE'
}
|
should not add headers when segment is opaque:
test/unit/instrumentation/undici.test.js#L69
Error [ERR_TEST_FAILURE]: Expected values to be loosely deep-equal:
[
'Both DT and CAT are disabled, not adding headers!'
]
should loosely deep-equal
[
'Not capturing data for outbound request (%s) because parent segment opaque (%s)',
'/foo',
'parent'
]
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:61:5)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:
[
'Both DT and CAT are disabled, not adding headers!'
]
should loosely deep-equal
[
'Not capturing data for outbound request (%s) because parent segment opaque (%s)',
'/foo',
'parent'
]
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:69:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:62: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: [ 'Both DT and CAT are disabled, not adding headers!' ],
expected: [ 'Not capturing data for outbound request (%s) because parent segment opaque (%s)', '/foo', 'parent' ],
operator: 'deepEqual'
},
code: 'ERR_TEST_FAILURE'
}
|
should get diff parent segment across diff async execution contexts:
test/unit/instrumentation/undici.test.js#L161
Error [ERR_TEST_FAILURE]: <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [
TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 4,
attributes: [Object: null prototype] {
hostname: {
destinations: 16,
... != <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [
TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 4,
attributes: [Object: null prototype] {
hostname: {
destinations: 16,
...
at process.emit (node:events:517:28)
at process.emit (/home/runner/work/node-newrelic/node-newrelic/node_modules/source-map-support/source-map-support.js:516:21)
at process.processEmit [as emit] (/home/runner/work/node-newrelic/node-newrelic/node_modules/libtap/node_modules/signal-exit/index.js:199:34) {
failureType: 'unhandledRejection',
cause: AssertionError [ERR_ASSERTION]: <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [
TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 4,
attributes: [Object: null prototype] {
hostname: {
destinations: 16,
... != <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [
TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 4,
attributes: [Object: null prototype] {
hostname: {
destinations: 16,
...
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:173:20
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [TraceSegment],
expected: [TraceSegment],
operator: '!='
},
code: 'ERR_TEST_FAILURE'
}
|
request:create:
test/unit/instrumentation/undici.test.js#L50
Error [ERR_TEST_FAILURE]: Promise resolution is still pending but the event loop has already resolved
at process.emit (node:events:517:28)
at process.emit (/home/runner/work/node-newrelic/node-newrelic/node_modules/source-map-support/source-map-support.js:516:21)
at process.processEmit [as emit] (/home/runner/work/node-newrelic/node-newrelic/node_modules/libtap/node_modules/signal-exit/index.js:199:34) {
failureType: 'cancelledByParent',
cause: 'Promise resolution is still pending but the event loop has already resolved',
code: 'ERR_TEST_FAILURE'
}
|
undici instrumentation:
test/unit/instrumentation/undici.test.js#L18
Error [ERR_TEST_FAILURE]: Promise resolution is still pending but the event loop has already resolved
at process.emit (node:events:517:28)
at process.emit (/home/runner/work/node-newrelic/node-newrelic/node_modules/source-map-support/source-map-support.js:516:21)
at process.processEmit [as emit] (/home/runner/work/node-newrelic/node-newrelic/node_modules/libtap/node_modules/signal-exit/index.js:199:34) {
failureType: 'cancelledByParent',
cause: 'Promise resolution is still pending but the event loop has already resolved',
code: 'ERR_TEST_FAILURE'
}
|
properly tracks the number of active or harvested segments:
test/unit/transaction/trace/segment.test.js#L144
Error [ERR_TEST_FAILURE]: 0 == 1
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:135:3) {
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: 0 == 1
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:144:12)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:618:21)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/segment.test.js:135: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: 0,
expected: 1,
operator: '=='
},
code: 'ERR_TEST_FAILURE'
}
|
should report total time:
test/unit/transaction/trace/index.test.js#L496
Error [ERR_TEST_FAILURE]: agent is not defined
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/index.test.js:489:3) {
failureType: 'testCodeFailure',
cause: ReferenceError [Error]: agent is not defined
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/index.test.js:496:34)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:631:25)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/index.test.js:489:3)
at Test.run (node:internal/test_runner/test:632:9)
at Test.processPendingSubtests (node:internal/test_runner/test:374:7),
code: 'ERR_TEST_FAILURE'
}
|
should report the expected trees for trees with uncollected segments:
test/unit/transaction/trace/index.test.js#L557
Error [ERR_TEST_FAILURE]: agent is not defined
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/index.test.js:524:3) {
failureType: 'testCodeFailure',
cause: ReferenceError [Error]: agent is not defined
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/index.test.js:557:37)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:631:25)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/index.test.js:524:3)
at Test.run (node:internal/test_runner/test:632:9)
at Test.processPendingSubtests (node:internal/test_runner/test:374:7),
code: 'ERR_TEST_FAILURE'
}
|
should report the expected trees for branched trees:
test/unit/transaction/trace/index.test.js#L611
Error [ERR_TEST_FAILURE]: agent is not defined
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/index.test.js:577:3) {
failureType: 'testCodeFailure',
cause: ReferenceError [Error]: agent is not defined
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/index.test.js:611:37)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:631:25)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/transaction/trace/index.test.js:577:3)
at Test.run (node:internal/test_runner/test:632:9)
at Test.processPendingSubtests (node:internal/test_runner/test:374:7),
code: 'ERR_TEST_FAILURE'
}
|
should not require any arguments except a function:
test/unit/shim/shim.test.js#L430
Error [ERR_TEST_FAILURE]: TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attributes.incl... == null
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:430:5)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:363:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attributes.incl... == null
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:443:14)
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/shim/shim.test.js:430:5)
at Test.run (node:internal/test_runner/test:931:9)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:363: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: [TraceSegment],
expected: null,
operator: '=='
}
}
|
should not modify returned parent for opaque segments:
test/unit/shim/shim.test.js#L2372
Error [ERR_TEST_FAILURE]: <ref *179> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attr... == <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attrib...
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:2372:5)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:2300:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: <ref *179> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attr... == <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [],
config: <ref *1> Config {
[Symbol(kCapture)]: false,
[Symbol(shapeMode)]: false,
_events: [Object: null prototype] {
'attributes.enabled': [Function: bound update],
'attributes.exclude': [Function: bound update],
'attrib...
at /home/runner/work/node-newrelic/node-newrelic/test/unit/shim/shim.test.js:2383:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/shim.test.js:2374: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: [TraceSegment],
expected: [TraceSegment],
operator: '=='
}
}
|
should not add headers when segment is opaque:
test/unit/instrumentation/undici.test.js#L69
Error [ERR_TEST_FAILURE]: Expected values to be loosely deep-equal:
[
'Both DT and CAT are disabled, not adding headers!'
]
should loosely deep-equal
[
'Not capturing data for outbound request (%s) because parent segment opaque (%s)',
'/foo',
'parent'
]
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:61:13)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:
[
'Both DT and CAT are disabled, not adding headers!'
]
should loosely deep-equal
[
'Not capturing data for outbound request (%s) because parent segment opaque (%s)',
'/foo',
'parent'
]
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:69:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:62: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: [ 'Both DT and CAT are disabled, not adding headers!' ],
expected: [ 'Not capturing data for outbound request (%s) because parent segment opaque (%s)', '/foo', 'parent' ],
operator: 'deepEqual'
}
}
|
should get diff parent segment across diff async execution contexts:
test/unit/instrumentation/undici.test.js#L161
Error [ERR_TEST_FAILURE]: <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [
TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 4,
attributes: [Object: null prototype] {
hostname: {
destinations: 16,
... != <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [
TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 4,
attributes: [Object: null prototype] {
hostname: {
destinations: 16,
...
at process.emit (node:events:519:28)
at process.emit (/home/runner/work/node-newrelic/node-newrelic/node_modules/source-map-support/source-map-support.js:516:21)
at process.processEmit [as emit] (/home/runner/work/node-newrelic/node-newrelic/node_modules/libtap/node_modules/signal-exit/index.js:199:34) {
code: 'ERR_TEST_FAILURE',
failureType: 'unhandledRejection',
cause: AssertionError [ERR_ASSERTION]: <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [
TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 4,
attributes: [Object: null prototype] {
hostname: {
destinations: 16,
... != <ref *2> TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 0,
attributes: [Object: null prototype] {},
filter: [Function (anonymous)],
limit: Infinity
},
children: [
TraceSegment {
_collect: true,
_exclusiveDuration: null,
async: true,
attributes: Attributes {
attributeCount: 4,
attributes: [Object: null prototype] {
hostname: {
destinations: 16,
...
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:173:20
at processTicksAndRejections (node:internal/process/task_queues:105:5) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [TraceSegment],
expected: [TraceSegment],
operator: '!='
}
}
|
should get the parent segment shim when `undici_async_tracking` is false:
test/unit/instrumentation/undici.test.js#L195
Error [ERR_TEST_FAILURE]: parent segment should not be same
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:182:13)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: parent segment should not be same
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:195:18
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:186:16)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:917:21) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: 'ROOT',
expected: 'ROOT',
operator: '!='
}
}
|
should name segment with appropriate attrs based on request.path:
test/unit/instrumentation/undici.test.js#L224
Error [ERR_TEST_FAILURE]: 'ROOT' == 'External/unittesting.com/foo'
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:211:13)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: 'ROOT' == 'External/unittesting.com/foo'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:224:18
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:214:16)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:917:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'ROOT',
expected: 'External/unittesting.com/foo',
operator: '=='
}
}
|
should use proper url if http:
test/unit/instrumentation/undici.test.js#L246
Error [ERR_TEST_FAILURE]: 'ROOT' == 'External/unittesting.com/http'
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:236:13)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: 'ROOT' == 'External/unittesting.com/http'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:246:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:237: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: 'ROOT',
expected: 'External/unittesting.com/http',
operator: '=='
}
}
|
should use port in https if not 443:
test/unit/instrumentation/undici.test.js#L264
Error [ERR_TEST_FAILURE]: 'ROOT' == 'External/unittesting.com:9999/port-https'
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:254:13)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: 'ROOT' == 'External/unittesting.com:9999/port-https'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:264:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:255: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: 'ROOT',
expected: 'External/unittesting.com:9999/port-https',
operator: '=='
}
}
|
should use port in http if not 80:
test/unit/instrumentation/undici.test.js#L282
Error [ERR_TEST_FAILURE]: 'ROOT' == 'External/unittesting.com:8080/port-http'
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:272:13)
at async TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:50:3) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: 'ROOT' == 'External/unittesting.com:8080/port-http'
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:282:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:273: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: 'ROOT',
expected: 'External/unittesting.com:8080/port-http',
operator: '=='
}
}
|
should end current segment and restore to parent:
test/unit/instrumentation/undici.test.js#L385
Error [ERR_TEST_FAILURE]: parentSegment should now the active
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:373:13)
at Test.runInAsyncScope (node:async_hooks:211:14)
at TestContext.<anonymous> (/home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:372:11) {
code: 'ERR_TEST_FAILURE',
failureType: 'testCodeFailure',
cause: AssertionError [ERR_ASSERTION]: parentSegment should now the active
at /home/runner/work/node-newrelic/node-newrelic/test/unit/instrumentation/undici.test.js:385:16
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:261:37)
at wrapTransactionInvocation (/home/runner/work/node-newrelic/node-newrelic/lib/transaction/tracer/index.js:222: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/undici.test.js:374:14)
at Test.runInAsyncScope (node:async_hooks:211:14)
at Test.run (node:internal/test_runner/test:917:21) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: '9f33e956a5e36c1b',
expected: '03a09119fc50519f',
operator: '=='
}
}
|
test/integration/transaction/tracer.tap.js:
test/integration/transaction/tracer.tap.js#L1
[Error: test failed] { failureType: 'testCodeFailure', cause: 'test failed', code: 'ERR_TEST_FAILURE', exitCode: 1, signal: null }
|
test/integration/core/net.tap.js:
test/integration/core/net.tap.js#L1
[Error: test failed] { failureType: 'testCodeFailure', cause: 'test failed', code: 'ERR_TEST_FAILURE', exitCode: 1, signal: null }
|
test/integration/core/native-promises/native-promises.tap.js:
test/integration/core/native-promises/native-promises.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/transaction/tracer.tap.js:
test/integration/transaction/tracer.tap.js#L1
[Error: test failed] { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: 'test failed', exitCode: 1, signal: null }
|
test/integration/core/net.tap.js:
test/integration/core/net.tap.js#L1
[Error: test failed] { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: 'test failed', exitCode: 1, signal: null }
|
test/integration/core/native-promises/native-promises.tap.js:
test/integration/core/native-promises/native-promises.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/transaction/tracer.tap.js:
test/integration/transaction/tracer.tap.js#L1
[Error: test failed] { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: 'test failed', exitCode: 1, signal: null }
|
test/integration/core/net.tap.js:
test/integration/core/net.tap.js#L1
[Error: test failed] { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: 'test failed', exitCode: 1, signal: null }
|
test/integration/core/native-promises/native-promises.tap.js:
test/integration/core/native-promises/native-promises.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-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 🕐: 929.987ms
|
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: 4404
Suites 📂: 0
Passed ✅: 4304
Failed ❌: 78
Canceled 🚫: 0
Skipped ⏭️: 3
Todo 📝: 19
Duration 🕐: 66626.716ms
|
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: 4346
Suites 📂: 0
Passed ✅: 4304
Failed ❌: 19
Canceled 🚫: 4
Skipped ⏭️: 0
Todo 📝: 19
Duration 🕐: 65615.916ms
|
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: 4404
Suites 📂: 0
Passed ✅: 4351
Failed ❌: 31
Canceled 🚫: 0
Skipped ⏭️: 3
Todo 📝: 19
Duration 🕐: 73447.326ms
|
integration (18.x)
Total Tests: 66
Suites 📂: 0
Passed ✅: 63
Failed ❌: 3
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 132982.640ms
|
integration (20.x)
Total Tests: 66
Suites 📂: 0
Passed ✅: 63
Failed ❌: 3
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 143311.603ms
|
integration (22.x)
Total Tests: 66
Suites 📂: 0
Passed ✅: 63
Failed ❌: 3
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 172247.479ms
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
logs-18.x.tgz
|
393 KB |
|
logs-20.x.tgz
|
391 KB |
|
logs-22.x.tgz
|
391 KB |
|