You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- required packages ["[email protected]"]
-- installing ["[email protected]"]
-- running test "npm run test" with redis (env: {})
...
multi (transactions) commands
✓ multi commands
✓ multi command with generic command
1) multi command with error
✓ multi command that rejects
...
1 failing
1) redis@^4.0.0
multi (transactions) commands
multi command with error:
1 commands failed, see .replies and .errorIndexes for more information
% npm install --no-save [email protected]
% node use-redis.js
Use [email protected]
{
traceId: 'fc0104bfa216f189643ce8741cdc31b5',
parentId: undefined,
traceState: undefined,
name: 'redis-connect',
id: '3956ba119ab5de30',
kind: 2,
timestamp: 1703111117333000,
duration: 7778.773,
attributes: { 'db.system': 'redis' },
status: { code: 0 },
events: [],
links: []
}
{
traceId: 'e765425c2703c3f9153743aadb3a8dd2',
parentId: undefined,
traceState: undefined,
name: 'redis-SET',
id: 'f59c371a3ccba1ab',
kind: 2,
timestamp: 1703111117343000,
duration: 1928.125,
attributes: {
'db.system': 'redis',
'db.statement': 'SET key [1 other arguments]'
},
status: { code: 0 },
events: [],
links: []
}
{
traceId: '7a8aae2b4e0a715b656668a35912c4e4',
parentId: undefined,
traceState: undefined,
name: 'redis-INCR',
id: 'f6379c7099669368',
kind: 2,
timestamp: 1703111117343000,
duration: 1785.214,
attributes: { 'db.system': 'redis', 'db.statement': 'INCR key' },
status: { code: 2, message: 'ERR value is not an integer or out of range' },
events: [
{
name: 'exception',
attributes: {
'exception.type': 'Error',
'exception.message': 'ERR value is not an integer or out of range'
},
time: [ 1703111117, 344759161 ],
droppedAttributesCount: 0
}
],
links: []
}
replies: [ 'OK', [ErrorReply: ERR value is not an integer or out of range] ]
use-redis.js with 4.6.12
% npm install --no-save [email protected]
% node use-redis.js
Use [email protected]
{
traceId: '3469f889c3df3af3c281f66a9667c12e',
parentId: undefined,
traceState: undefined,
name: 'redis-connect',
id: 'fefa13498e2fe2ec',
kind: 2,
timestamp: 1703111003465000,
duration: 8308.435,
attributes: { 'db.system': 'redis' },
status: { code: 0 },
events: [],
links: []
}
{
traceId: 'b945a55978698646a9ccd4d12cbc77fa',
parentId: undefined,
traceState: undefined,
name: 'redis-SET',
id: 'f788e346e22e5507',
kind: 2,
timestamp: 1703111003475000,
duration: 2227.607,
attributes: {
'db.system': 'redis',
'db.statement': 'SET key [1 other arguments]'
},
status: {
code: 2,
message: '1 commands failed, see .replies and .errorIndexes for more information'
},
events: [
{
name: 'exception',
attributes: {
'exception.type': 'Error',
'exception.message': '1 commands failed, see .replies and .errorIndexes for more information'
},
time: [ 1703111003, 477204433 ],
droppedAttributesCount: 0
}
],
links: []
}
{
traceId: '47287d300cb423bc9e5259abaeeb3678',
parentId: undefined,
traceState: undefined,
name: 'redis-INCR',
id: '4a99d39f958a8be7',
kind: 2,
timestamp: 1703111003476000,
duration: 2115.322,
attributes: { 'db.system': 'redis', 'db.statement': 'INCR key' },
status: {
code: 2,
message: '1 commands failed, see .replies and .errorIndexes for more information'
},
events: [
{
name: 'exception',
attributes: {
'exception.type': 'Error',
'exception.message': '1 commands failed, see .replies and .errorIndexes for more information'
},
time: [ 1703111003, 478103972 ],
droppedAttributesCount: 0
}
],
links: []
}
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
[MultiErrorReply: 1 commands failed, see .replies and .errorIndexes for more information] {
replies: [ 'OK', [ErrorReply: ERR value is not an integer or out of range] ],
errorIndexes: [ 1 ]
}
The main difference is that now client.multi()... throws with a MultiErrorReply. The error does include enough information to set span.status on each span as before, but the instrumentation will need to adjust for that (using err.replies and possibly err.errorIndexes).
The text was updated successfully, but these errors were encountered:
…dis >=4.6.12
In [email protected] the behaviour of multi.exec() changed to *throw* a
MultiErrorReply if any of the commands errored out. The individual
command replies are available at 'err.replies', instead of as the
promise result. This adjusts the instrumentation to generate
spans as before: only setting SpanStatusCode.ERROR and calling
span.recordException for the individual commands that failed.
Fixes: open-telemetry#1874
…dis >=4.6.12 (#1904)
In [email protected] the behaviour of multi.exec() changed to *throw* a
MultiErrorReply if any of the commands errored out. The individual
command replies are available at 'err.replies', instead of as the
promise result. This adjusts the instrumentation to generate
spans as before: only setting SpanStatusCode.ERROR and calling
span.recordException for the individual commands that failed.
Fixes: #1874
Co-authored-by: Daniel Dyla <[email protected]>
"test-all-versions" (TAV) tests are failing for
@opentelemetry/instrumentation-redis-4
on [email protected]. E.g. https://github.com/open-telemetry/opentelemetry-js-contrib/actions/runs/7263854755/job/19790084068#step:9:36052The tests pass with [email protected].
repro
This is using the current latest "main" (commit e35e370).
Full output run
the cause
[email protected] includes an update to
@redis/[email protected]
, which includes a change to handling of runtime errors inclient.multi()...
such that it will throw. See redis/node-redis#2665details
Save this to "use-redis.js" in the "plugins/node/opentelemetry-instrumentation-redis-4" dir:
Start a temporary redis server:
Then run use-redis.js with [email protected] and 4.6.12:
use-redis.js with 4.6.11
use-redis.js with 4.6.12
The main difference is that now
client.multi()...
throws with aMultiErrorReply
. The error does include enough information to setspan.status
on each span as before, but the instrumentation will need to adjust for that (usingerr.replies
and possiblyerr.errorIndexes
).The text was updated successfully, but these errors were encountered: