...
node_tests-1 | # @aws-sdk/client-sqs fixtures
node_tests-1 | # simple SQS V3 usage scenario (fixtures/use-client-sqs.js)
node_tests-1 | ok 1 fixtures/use-client-sqs.js exited successfully: err=null
node_tests-1 | ok 2 metadata
node_tests-1 | ok 3 got the transaction
node_tests-1 | ok 4 span is valid (per apm-server intake schema)
node_tests-1 | ok 5 span is valid (per apm-server intake schema)
node_tests-1 | ok 6 span is valid (per apm-server intake schema)
node_tests-1 | ok 7 span is valid (per apm-server intake schema)
node_tests-1 | ok 8 span is valid (per apm-server intake schema)
node_tests-1 | ok 9 all spans have the same trace_id
node_tests-1 | ok 10 all spans have the same transaction_id
node_tests-1 | ok 11 all spans have sync=false
node_tests-1 | ok 12 all spans have sample_rate=1
node_tests-1 | ok 13 sendMessage
node_tests-1 | ok 14 sendMessageBatch
node_tests-1 | ok 15 receiveMessage (0 span links)
node_tests-1 | not ok 16 receiveMessage (0 span links)
node_tests-1 | ---
node_tests-1 | operator: deepEqual
node_tests-1 | expected: |-
node_tests-1 | -- fatal: Test exited with code 1
node_tests-1 | { name: 'SQS POLL from elasticapmtest-queue-1.fifo', type: 'messaging', subtype: 'sqs', action: 'poll', context: { service: { target: { type: 'sqs', name: 'elasticapmtest-queue-1.fifo' } }, destination: { address: 'localstack', port: 4566, cloud: { region: 'us-east-2' }, service: { type: '', name: '', resource: 'sqs/elasticapmtest-queue-1.fifo' } }, message: { queue: { name: 'elasticapmtest-queue-1.fifo' } } }, outcome: 'success' }
node_tests-1 | actual: |-
node_tests-1 | { name: 'SQS POLL from elasticapmtest-queue-1.fifo', type: 'messaging', subtype: 'sqs', action: 'poll', context: { service: { target: { type: 'sqs', name: 'elasticapmtest-queue-1.fifo' } }, destination: { service: { type: '', name: '', resource: 'sqs/elasticapmtest-queue-1.fifo' }, address: 'localstack', port: 4566, cloud: { region: 'us-east-2' } }, message: { queue: { name: 'elasticapmtest-queue-1.fifo' } } }, outcome: 'success', composite: { compression_strategy: 'exact_match', count: 2, sum: 5053.418000000001 } }
node_tests-1 | at: Object.checkApmServer (/app/test/instrumentation/modules/@aws-sdk/client-sqs.test.js:182:13)
node_tests-1 | stack: |-
node_tests-1 | Error: receiveMessage (0 span links)
node_tests-1 | at Test.assert [as _assert] (/app/node_modules/tape/lib/test.js:492:48)
node_tests-1 | at Test.tapeDeepEqual (/app/node_modules/tape/lib/test.js:747:7)
node_tests-1 | at Object.checkApmServer (/app/test/instrumentation/modules/@aws-sdk/client-sqs.test.js:182:13)
node_tests-1 | at done (/app/test/_utils.js:365:26)
node_tests-1 | at ChildProcess.exithandler (node:child_process:410:7)
node_tests-1 | at ChildProcess.emit (node:events:519:28)
node_tests-1 | at maybeClose (node:internal/child_process:1101:16)
node_tests-1 | at ChildProcess._handle.onexit (node:internal/child_process:304:5)
node_tests-1 | ...
node_tests-1 | ok 17 deleteMessageBatch
node_tests-1 | not ok 18 collected span.links
node_tests-1 | ---
node_tests-1 | operator: deepEqual
node_tests-1 | expected: |-
node_tests-1 | [ { trace_id: 'eb596a6fab48b8fad4a706a21dc20f8b', span_id: '11f5a5dfc399667d' }, { trace_id: 'eb596a6fab48b8fad4a706a21dc20f8b', span_id: '4280370d8abd7c42' }, { trace_id: 'eb596a6fab48b8fad4a706a21dc20f8b', span_id: '4280370d8abd7c42' } ]
node_tests-1 | actual: |-
node_tests-1 | []
node_tests-1 | at: Object.checkApmServer (/app/test/instrumentation/modules/@aws-sdk/client-sqs.test.js:248:9)
node_tests-1 | stack: |-
node_tests-1 | Error: collected span.links
node_tests-1 | at Test.assert [as _assert] (/app/node_modules/tape/lib/test.js:492:48)
node_tests-1 | at Test.tapeDeepEqual (/app/node_modules/tape/lib/test.js:747:7)
node_tests-1 | at Object.checkApmServer (/app/test/instrumentation/modules/@aws-sdk/client-sqs.test.js:248:9)
node_tests-1 | at done (/app/test/_utils.js:365:26)
node_tests-1 | at ChildProcess.exithandler (node:child_process:410:7)
node_tests-1 | at ChildProcess.emit (node:events:519:28)
node_tests-1 | at maybeClose (node:internal/child_process:1101:16)
node_tests-1 | at ChildProcess._handle.onexit (node:internal/child_process:304:5)
node_tests-1 | ...
node_tests-1 | ok 19 all spans accounted for, remaining spans: []
node_tests-1 | # simple SQS V3 with ESM (fixtures/use-client-sqs.mjs)
node_tests-1 | ok 20 fixtures/use-client-sqs.mjs exited successfully: err=null
node_tests-1 | ok 21 metadata
node_tests-1 | ok 22 got the transaction
node_tests-1 | ok 23 span.parent_id
node_tests-1 | ok 24 span.name
node_tests-1 | ok 25 all spans accounted for
node_tests-1 |
node_tests-1 | 1..25
node_tests-1 | # tests 25
node_tests-1 | # pass 23
node_tests-1 | # fail 2
node_tests-1 |
node_tests-1 |
The aws-sdk/client-sqs tests are frequently, but not always failing.
E.g. https://github.com/elastic/apm-agent-nodejs/actions/runs/25505496259
See:
https://github.com/elastic/apm-agent-nodejs/actions/workflows/tav.yml
Often it is for Node.js 18, but happens for Node.js 22 as well.
more complete CI test log output:
Seems like it is always in the collected span links for one of the fixtures: