fix: join redis and valkey pipeline commands with newlines for correct agent obfuscation#4593
Conversation
… agent obfuscation
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 5a995ca | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
BenchmarksBenchmark execution time: 2026-03-25 13:39:03 Comparing candidate commit 5a995ca in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 216 metrics, 8 unstable metrics.
|
ajgajg1134
left a comment
There was a problem hiding this comment.
Looks good from the trace-agent's perspective :)
|
|
||
| span := spans[0] | ||
| assert.Equal(t, "SET GET SET GET SET", span.Tag(ext.ResourceName)) | ||
| assert.Equal(t, "SET\nGET\nSET\nGET\nSET", span.Tag(ext.ResourceName)) |
There was a problem hiding this comment.
Is this a breaking change for the backend? Or is it handled by it so resource name is virtually the same as before?
There was a problem hiding this comment.
Yeah, good catch. This is technically breaking if anyone was relying on the buggy behavior. But since it’s fixing something unintended and aligning things with the expected behavior, we’re treating it as a bug fix. We can call it out in the release notes to make it clear.
darccio
left a comment
There was a problem hiding this comment.
Approving. Keep in mind to highlight this in the release notes.
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
c281e00
into
main
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
🚀 New features to boost your workflow:
|
What does this PR do?
valkeyare now passed throughobfuscatedResourcealongsideredis, so client-side stats computed by the tracer are obfuscated consistently with what the agent applies later.SET GET SETinto justSET.SET GET SET ....Motivation
Fix resource names / stats for the following integrations:
contrib/valkey-io/valkey-go: Obfuscation was enabled fortype:valkeyspans in the agent but not in dd-trace-go, so stats computed client-side used the raw resource name for valkey spans, while the agent obfuscated them — causing a mismatch between span resource names and their stats in the Datadog UI.contrib/redis/rueidis: For rueidis pipeline spans, obfuscation was applied but space-joined commands collapsed to a single verb, losing the full pipeline context.Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!