Support valkey-go tracing#3081
Conversation
Datadog ReportBranch report: ❌ 8 Failed (0 Known Flaky), 5167 Passed, 70 Skipped, 2m 54.4s Total Time ❌ Failed Tests (8)
|
e41ab88 to
7c97f5b
Compare
7c97f5b to
6aa8d69
Compare
11e7c51 to
2750600
Compare
2750600 to
fe59e6d
Compare
|
@keisku Thanks for contributing this integration! Please fix the conflicts and this should be good to go. Also remember to create the same PR against |
Signed-off-by: keisku <[email protected]>
Signed-off-by: keisku <[email protected]>
Signed-off-by: keisku <[email protected]>
Signed-off-by: keisku <[email protected]>
| skipRawCommand bool | ||
| } | ||
|
|
||
| func (c *coreClient) peerTags() []tracer.StartSpanOption { |
There was a problem hiding this comment.
The agent checks a list of tags to compute peer.service, and I think both out.host and peer.hostname would be considered in this case. But for consistency with other integrations, I think its preferred to just set out.host (I am asking around if this preference has changed recently and if we have any documentation about it)
| opts = append(opts, []tracer.StartSpanOption{ | ||
| // valkeyotel tags | ||
| tracer.Tag("db.stmt_size", input.size), | ||
| tracer.Tag("db.operation", input.command), |
There was a problem hiding this comment.
We don't need to add obfuscation, since its already done in the agent (the code you linked). However I just noticed there's an issue, since that code will only run if span.type is redis, so it won't run for valkey. I will talk to the apm-agent team about this.
But basically what we want to do here is:
if !input.skipRawCommand {
opts = append(opts, tracer.Tag(ext.ValkeyRawCommand, input.command))
}Also it is preferred to set only the raw command tag, since its the one the agent checks for obfuscation (when the logic is updated to check for valkey as well).
787b31f to
27b0fec
Compare
rarguelloF
left a comment
There was a problem hiding this comment.
LGTM, thanks for the contribution! @keisku
Datadog ReportBranch report: ✅ 0 Failed, 5216 Passed, 72 Skipped, 2m 45.95s Total Time |
What does this PR do?
Support https://github.com/valkey-io/valkey-go
Example:
Motivation
#2920
Reviewer's Checklist
v2-devbranch and reviewed by @DataDog/apm-go.Unsure? Have a question? Request a review!