feat: improve pipeline tracing for rueidis and valkey with deduplicated resource names#4511
Open
snutiise wants to merge 1 commit intoDataDog:mainfrom
Open
feat: improve pipeline tracing for rueidis and valkey with deduplicated resource names#4511snutiise wants to merge 1 commit intoDataDog:mainfrom
snutiise wants to merge 1 commit intoDataDog:mainfrom
Conversation
…ed resource names
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.
What does this PR do?
Improve pipeline tracing for
contrib/redis/rueidisandcontrib/valkey-io/valkey-goby replacing the truncated command concatenation approach with deduplicated, alphabetically sorted resource names and structured pipeline tags.Before (6 commands: SET x3, GET x3)
"SET GET SET GET SET"(truncated to 5, lossy)After
"GET SET"(deduplicated, sorted alphabetically, stable grouping)redis.pipeline.length: 6(total command count)redis.pipeline.command_counts: "GET:3 SET:3"(per-type breakdown)Changes applied consistently to both packages
processCommandMulti/processCommandMultiCache/multiCommandwithbuildPipelineInfo/countCommandNames/countCacheableCommandNamesext.RedisPipelineLength,ext.RedisPipelineCommandCounts,ext.ValkeyPipelineLength,ext.ValkeyPipelineCommandCountsconstantsraw_commandtag on pipeline spans (rawCommand && cmd.raw != "")DoMultiCachetest coverageMotivation
The previous implementation concatenated all command names into the resource name (e.g.
"SET GET SET GET SET"), truncated to the first 5. This causedThe new approach provides stable resource grouping (same command types always produce the same resource name regardless of count or order) while moving detailed metrics to tags where they belong.
Note: This changes the resource name format for
DoMulti/DoMultiCache/DoMultiStreamspans (e.g."SET GET SET GET SET"→"GET SET"). Existing monitors or dashboards filtering on the old resource name format may need to be updated.Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!