-
Notifications
You must be signed in to change notification settings - Fork 462
contrib/go-redis: add redis db index tag #1755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d70b2ba
to
cc9f45a
Compare
cc9f45a
to
f7623e6
Compare
@@ -122,10 +122,11 @@ func (c *Pipeliner) execWithContext(ctx context.Context) ([]redis.Cmder, error) | |||
tracer.ResourceName("redis"), | |||
tracer.Tag(ext.TargetHost, p.host), | |||
tracer.Tag(ext.TargetPort, p.port), | |||
tracer.Tag("out.db", p.db), | |||
tracer.Tag("out.db", strconv.Itoa(p.db)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for the type change here to break an existing customer? (I noticed the other major versions of this already use a string here, it's curious this version doesn't)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out.db
should not change in this PR (I just changed where the string conversion is happening, since the new db.redis.database_index
is an int
).
Please let me know if this clarifies the question or if I missed something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, I missed that the strconv was happening before, just in a different spot. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
What does this PR do?
Adds
db.redis.database_index
tag to the following integrations:contrib/go-redis/redis
contrib/go-redis/redis.v7
contrib/go-redis/redis.v8
Motivation
Unify span tags across tracers.
Describe how to test/QA your changes
Reviewer's Checklist
Triage
milestone is set.