Uh oh!
There was an error while loading. Please reload this page.
feat(core): Emit low-cardinality cache.* span names - #23830
Merged
Conversation
Lms24force-pushed
the
lms/feat-core-cache-span-names
branch
from
September 1, 2026 12:06
c59c170 to
a3d8a59CompareContributor
size-limit report 📦
|
Lms24force-pushed
the
lms/feat-core-cache-span-names
branch
from
September 1, 2026 14:10
a3d8a59 to
7c951f5CompareLms24
marked this pull request as ready for review
September 1, 2026 14:11
Lms24
requested review from
isaacs, mydea, nicohrubec and s1gr1d
and removed request for
a teamSeptember 1, 2026 14:11
chargome
approved these changes
Sep 2, 2026
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The nuxt-3 test app runs with span streaming enabled, so cache spans now
carry the low-cardinality `cache.{operation}` name instead of falling back
to the cache keys. Also assert the newly emitted `cache.operation`
attribute, since the span name is derived from it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>Lms24force-pushed
the
lms/feat-core-cache-span-names
branch
from
September 2, 2026 10:41
99e03e0 to
58b1391CompareLms24
enabled auto-merge (squash)
September 2, 2026 10:41
Uh oh!
There was an error while loading. Please reload this page.
Lms24 added a commit
that referenced
this pull request
Sep 2, 2026
… suites The streamed expectations these suites gained were written before #23830 landed, so they still expected cache spans to be named after the cache key and carried no `cache.operation` attribute. Name them after the cache operation the hook now uses, and fold the repeated peer/operation attributes into a `cacheSpan` helper so the two cannot drift apart again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Lms24 added a commit
that referenced
this pull request
Sep 2, 2026
node-redis v4 writes its `localhost:6379` socket defaults back into `client.options`, v5 does not. Reading the options as-is therefore reported `server.address`/`server.port` for a v4 client and neither for the identically configured v5 one — so the same client got `SET localhost:6383` on v4 and the bare `redis` fallback on v5 once span names became low cardinality. Resolve the connection the way node-redis >= 5.12 reports it on its own diagnostics channel instead: a TCP client falls back to `localhost:6379`, and a unix socket reports its path as the address and no port. Batch spans go through the same helper rather than repeating the option lookup. The redis-cache suite picks up the low-cardinality cache names from #23830 in the same pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Lms24 added a commit
that referenced
this pull request
Sep 2, 2026
… suites The streamed expectations these suites gained were written before #23830 landed, so they still expected cache spans to be named after the cache key and carried no `cache.operation` attribute. Name them after the cache operation the hook now uses, and fold the repeated peer/operation attributes into a `cacheSpan` helper so the two cannot drift apart again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Lms24 added a commit
that referenced
this pull request
Sep 2, 2026
node-redis v4 writes its `localhost:6379` socket defaults back into `client.options`, v5 does not. Reading the options as-is therefore reported `server.address`/`server.port` for a v4 client and neither for the identically configured v5 one — so the same client got `SET localhost:6383` on v4 and the bare `redis` fallback on v5 once span names became low cardinality. Resolve the connection the way node-redis >= 5.12 reports it on its own diagnostics channel instead: a TCP client falls back to `localhost:6379`, and a unix socket reports its path as the address and no port. Batch spans go through the same helper rather than repeating the option lookup. The redis-cache suite picks up the low-cardinality cache names from #23830 in the same pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Lms24 added a commit
that referenced
this pull request
Sep 2, 2026
With span streaming enabled, redis `db.query` spans are named
`{db.operation.name} {server.address}:{server.port}`. Redis has no SQL
statement to summarize and no collection to pair the command with, so
the connection is the only low-cardinality target left. The command and
its arguments stay on `db.query.text`. `db.namespace` is not used: for
redis it is the numeric database index.
| | static | streamed |
|---|---|---|
| ioredis | `set test-key [1 other arguments]` | `set localhost:6379` |
| node-redis | `SET test-key [1 other arguments]` | `SET localhost:6379`
|
| native DC | `redis-SET` | `SET localhost:6379` |
| unix socket | `SET test-key [1 other arguments]` | `redis` |
| `FCALL` | unchanged | `fcall my_func` |
| batch | `MULTI` / `PIPELINE` | unchanged |
| cache | unchanged | unchanged |
Changes:
- `FCALL`/`FCALL_RO` are named after the redis function
- New `db.stored_procedure.name` attribute holds that function name
- Skipped when the library redacted the function name
- Batch spans now also set `db.operation.name`
- node-redis clients always report `server.address` and `server.port`
- Cache span names untouched, already made low cardinality in #23830
- Streamed tests added to four redis suites
- `MIGRATION.md` entry added
node-redis v4 writes its `localhost:6379` socket defaults back into
`client.options`, v5 does not. The same client therefore reported a
connection on v4 and none on v5. Both now resolve it the way node-redis
>= 5.12 publishes it on its diagnostics channel, in both trace
lifecycles.s1gr1d added a commit
that referenced
this pull request
Sep 2, 2026
Storage span names are `cache.{operation}` under span streaming since #23830.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>s1gr1d added a commit
that referenced
this pull request
Sep 2, 2026
Storage span names are `cache.{operation}` under span streaming since #23830.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>s1gr1d added a commit
that referenced
this pull request
Sep 2, 2026
Storage span names are `cache.{operation}` under span streaming since #23830.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
cache.*span names following the cache span name rules proposed in feat(names): Addcachespan name rules sentry-conventions#605captureStorageEvents, nuxtcreateStoragePlugincloses#23818