Repository navigation
fix(telemetry): name the configured server and the named stack on Redis telemetry - #282
Merged
Merged
Conversation
…is telemetry A profiled command's dependency target was the node that served it, so on a cluster each shard showed as its own target; it is now the configured endpoints, with the node in a RedisNode property. A named caching stack's telemetry is tagged with a CachingStack property, so its stream and topic metrics no longer mix with the application's. A session opened on the application's Redis profiler is opened on each named stack's profiler too, so the stack's commands keep the request's session. Signed-off-by: Cosmin Staicu <cosmin.staicu@uipath.com>
cosmin-staicu
requested review from
alinahornet,
cosminvlad,
litheon,
lucianaparaschivei and
razvalex
as code owners
October 23, 2026 12:01
|
🔎 Maintainer heads-up: automated triage flagged this PR as potentially material, so it may need a signed CLA in addition to the DCO sign-off. Strong signals
This is advisory only — the bot does not decide. Please judge against the CLA criteria (material, product-critical, patent-sensitive, corporate contributor, broad commercial use). Note that thresholds can be gamed by splitting PRs, so use your judgement.
|
…corator test's subject Signed-off-by: Cosmin Staicu <cosmin.staicu@uipath.com>
|
razvalex
approved these changes
Oct 23, 2026
cosmin-staicu
added a commit
that referenced
this pull request
Oct 23, 2026
…is telemetry (2.1) (#283) Three fixes to the Redis telemetry, most visible on a cluster and with `AddNamedCaching`. **Dependency target.** `ProfiledCommandProcessor` used the endpoint that served the command as the target, so on a cluster every shard's IP and port showed up as its own dependency target. The target is now the endpoints of `RedisConnectionOptions.ConnectionString` (with default ports filled in), and the node moves to a new `RedisNode` property (`ProfiledCommandProcessor.NodeField`). Without a connection string, as with a `ConnectionFactory`, the node stays the target. **Named stack tag.** A named stack forwarded the application's `ICachingTelemetryProvider` as is, so the two stacks' dependencies and `Caching.Stats.*` metrics were indistinguishable, and stream metrics with the same names mixed. The stack now wraps it in `StackTelemetryProvider`, which adds `CachingStack=<name>` to every call. The application's stack adds no tag. A provider registered through `configureServices` is left alone. **Profiler sessions.** Each stack has its own `RedisProfiler`, and a session opened on the application's profiler never reached the stack's, so the stack's commands landed in its default session without the request's session id. The application's profiler now opens and closes each session on the stack's profilers too. Forwarding the application's profiler into the stack still works (it is then the same instance). Not changed: `ICachingTelemetryProvider` and the rest of Abstractions. Tests: processor target and node cases, the decorator on all four calls (including more than nine properties), the profiler link (open, process on close, disposed follower), and the named stack wiring. Each fix was red-checked by mutating it out. Release `-warnaserror` build clean; the full suite passes on net10.0 and net8.0, with the Redis integration tests. Backport of #282 to 2.1.x. On 2.1 the telemetry interface takes spans, so the decorator copies from a span and the tests use the recording provider instead of a substitute. --------- Signed-off-by: Cosmin Staicu <cosmin.staicu@uipath.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 free
to 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.



Three fixes to the Redis telemetry, most visible on a cluster and with
AddNamedCaching.Dependency target.
ProfiledCommandProcessorused the endpoint that served the command as the target, so on a cluster every shard's IP and port showed up as its own dependency target. The target is now the endpoints ofRedisConnectionOptions.ConnectionString(with default ports filled in), and the node moves to a newRedisNodeproperty (ProfiledCommandProcessor.NodeField). Without a connection string, as with aConnectionFactory, the node stays the target.Named stack tag. A named stack forwarded the application's
ICachingTelemetryProvideras is, so the two stacks' dependencies andCaching.Stats.*metrics were indistinguishable, and stream metrics with the same names mixed. The stack now wraps it inStackTelemetryProvider, which addsCachingStack=<name>to every call. The application's stack adds no tag. A provider registered throughconfigureServicesis left alone.Profiler sessions. Each stack has its own
RedisProfiler, and a session opened on the application's profiler never reached the stack's, so the stack's commands landed in its default session without the request's session id. The application's profiler now opens and closes each session on the stack's profilers too. Forwarding the application's profiler into the stack still works (it is then the same instance).Not changed:
ICachingTelemetryProviderand the rest of Abstractions.Tests: processor target and node cases, the decorator on all four calls (including more than nine properties), the profiler link (open, process on close, disposed follower), and the named stack wiring. Each fix was red-checked by mutating it out. Release
-warnaserrorbuild clean; the full suite passes on net10.0 and net8.0, with the Redis integration tests.