-
Notifications
You must be signed in to change notification settings - Fork 126
Description
Description
In order to record Redis database transactions via aioredis
client library, we upgraded the newrelic python agent from v7.4.0.172 to v7.16.0.178
Service degradation was observed as the update was rolled out in production.
The cause was that the newrelic
wrapped aioredis
functions for Pipelines were failing to execute.
To me, it seems that the new aioredis
integration is wrapping all of the functions with async and effectively returning a coroutine
while the original implementation returns an Awaitable
(Pipeline) always, that need not be awaited immediately.
Since aioredis
supports both sync and async callbacks in the transaction function, the newrelic package should too.
Refer to the reproducible example below.
Expected Behavior
All functions to work the same as without newrelic integrations. The functionality should not break.
Troubleshooting or NR Diag results
This log was printed to stderr when aioredis
pipeline set was used in a transaction.
RuntimeWarning: coroutine '_wrap_AioRedis_method_wrapper.<locals>._nr_wrapper_AioRedis_method_' was never awaited
Steps to Reproduce
Instructions and repro here -
https://gist.github.com/vishal-wadhwa/337ff7c7e3146ede0849cbbbfff107b0
Your Environment
Not relevant. Reproducible in all environments.
Additional context
NA