feat(server-utils)!: Emit low cardinality redis and mongodb span names - #23603
feat(server-utils)!: Emit low cardinality redis and mongodb span names#23603Lms24 wants to merge 1 commit into
Conversation
Neither driver reports a SQL statement, so there is no query summary to name
their spans after. With span streaming they use the next conventions template
they can fill instead: redis pairs the command with `{server.address}:{server.port}`
(it has no collection or namespace), mongodb pairs the operation with
`{db.collection.name}`. Both fall back to `{db.system.name}`.
This keeps the serialized redis command, which carries the key and its
arguments, out of the span name. It stays on `db.query.text`.
`traceLifecycle: 'static'` keeps the existing names.
Refs #23523
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 866f29c. Configure here.
| attributes: expect.objectContaining({ 'db.query.text': 'set test-key [1 other arguments]' }), | ||
| }), | ||
| ); | ||
| }); |
There was a problem hiding this comment.
Missing streamed integration tests
Medium Severity
This feat PR only adds a unit test for the ioredis orchestrion path. Per the review rules, feat PRs need at least one integration or E2E test. The new low-cardinality naming for redis (startCommandSpan) and mongodb (startMongoSpan) also has no coverage, and there is no streamed suite like postgres-streamed. Flagged because it was mentioned in the rules file.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 866f29c. Configure here.
size-limit report 📦
|


Neither driver has a SQL statement to summarize. With span streaming enabled:
{command} {server.address}:{server.port}set test-key [1 other arguments]becomesset localhost:6379{db.operation.name} {db.collection.name}, e.g.find usersdb.system.namedb.query.texttraceLifecycle: 'static'keeps the existing namesRefs #23523