-
Notifications
You must be signed in to change notification settings - Fork 600
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
Redis instrumentation: support older redis-client #1673
Conversation
Redis instrumentation: * update `call_pipelined_with_tracing` to yield early (instead of crashing) if a db value cannot be obtained * rename `_nr_client` to `_nr_redis_client_config` to make it more clear that it holds a config object and not a client object, even though config getters can be called directly on the `redis` gem's client object * update `_nr_redis_client_config` to add support for `redis-client` gem versions older than v0.11 * update `_nr_redis_client_config` to raise upon failing to get at the underlying config object * minor exception handling updates to include class names * update the unit tests accordingly
Ruby 2.2 raises with this test as expected, but not in the way that's expected. The others in this group are skipping 2.2 already, just have this one skip it as well
One way to reproduce the issue:
A reproduction will produce a crash with a stack trace. A success after applying this PR will produce a constantly polling listening process without any errors (hit ctrl-c to stop it from listening). |
The underlying `NewRelic::Agent::Transaction::DatastoreSegment` class permits `nil` for the database name argument, so it is perfectly fine to still create an instance of that class to still record all of the information we _do_ have, despite the db name value being `nil`. Thank you, @kaylareopelle
update CHANGELOG to reference issue 1650 and PR 1673
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.
Thanks for the nil
value adjustment! The comments are all suggestions/questions that don't need to be addressed. Feel free to disregard and merge.
address PR feedback
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.
makes sense!
SimpleCov Report
|
Redis instrumentation:
call_pipelined_with_tracing
to yield early (instead of crashing) if a db value cannot be obtained_nr_client
to_nr_redis_client_config
to make it more clear that it holds a config object and not a client object, even though config getters can be called directly on theredis
gem's client object_nr_redis_client_config
to add support forredis-client
gem versions older than v0.11_nr_redis_client_config
to raise upon failing to get at the underlying config objectresolves #1650
resolves #1671