-
Notifications
You must be signed in to change notification settings - Fork 17
Redis Database Auto Tracing #343
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
Codecov Report
@@ Coverage Diff @@
## master #343 +/- ##
==========================================
+ Coverage 84.11% 85.16% +1.04%
==========================================
Files 37 38 +1
Lines 1429 1476 +47
==========================================
+ Hits 1202 1257 +55
+ Misses 227 219 -8
Continue to review full report at Codecov.
|
| key=ensure_utf8(key), | ||
| hostname=ensure_utf8(connection.host), | ||
| port=ensure_utf8(connection.port), | ||
| connectionName=None, |
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.
From this, I'd assume that named connections aren't supported by python's redis client. (No problem if it isn'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.
Don't see any support for it in the client. Unless this is referring to whether the connection is a pool or not?
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.
I initially wrote it to take advantage of the way ioredis.js allows multiple user-defined connections that users can name with arbitrary string values. Other modules don't necessarily support that, which isn't a deal-stopper, but I could see users appreciating the convenience of seeing named connections if they've been able to define them.
mrickard
left a comment
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.
Sadly, it looks as though the py 2.7 environment is presenting a problem.
|
|
||
| entry = trace._asdict() | ||
| entry["type"] = entry.pop("entryType") | ||
| entry["dbType"] = db_type |
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.
Do we know this will be "Redis" at the time this is invoked? In the JS modules, I've had to set the string in our code.
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.
Yes, it gets set by collect_redis_metrics in the auto_db module.
mrickard
left a comment
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.
👍
Closes #342