You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When I run my code with NR auto instrumentation it wraps redis.asyncio.client.RedisClient.pubsub with an async wrapper which causes an error when I try to invoke a __aenter__ on the object.
Expected Behavior
A regular sync wrapper should have been used to not change the library default behavior.
**Troubleshooting or [NR Diag]
client.subrcibe() => <coroutine object _wrap_AioRedis_method_wrapper.<locals>._nr_wrapper_AioRedis_async_method_ at 0x7fefca629e00>
error on `async with pubsub:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/strawberry/subscriptions/protocols/graphql_ws/handlers.py", line 168, in handle_async_results
async for result in result_source:
File "/usr/local/lib/python3.10/site-packages/graphql/execution/map_async_iterator.py", line 59, in __anext__
raise error
File "/app/src/schemas/subscription/subscription.py", line 30, in function_name1
async for message in controller.subscribe_to_updates(
File "/app/src/*internal_path*", line 69, in subscribe_to_updates
async for message in self.redis_adapter.listen(
File "/app/src/*internal_path*/redis_adapter.py", line 53, in listen
async with pubsub:
AttributeError: __aenter__
Steps to Reproduce
from redis.asyncio import Redis
async_redis = Redis.from_url(REDIS_URL)
async def redis_test():
pubsub = async_redis.pubsub()
async with pubsub:
pass
Additional context
Similar issues have been posted before. #623 was closed but there is still other open (#782, #807) - including PR that might solve this issue (#782, #808).
Unfortunately we will have to disable NR while this is not solved leaving an unmonitored application.
The text was updated successfully, but these errors were encountered:
The latest release of the agent should have a fix for this issue. If this is still an issue for you with the latest version (v8.10.0), we can reopen this ticket
Description
When I run my code with NR auto instrumentation it wraps
redis.asyncio.client.RedisClient.pubsub
with an async wrapper which causes an error when I try to invoke a__aenter__
on the object.Expected Behavior
A regular sync wrapper should have been used to not change the library default behavior.
**Troubleshooting or [NR Diag]
client.subrcibe() =>
<coroutine object _wrap_AioRedis_method_wrapper.<locals>._nr_wrapper_AioRedis_async_method_ at 0x7fefca629e00>
error on `async with pubsub:
Steps to Reproduce
Your Environment
Additional context
Similar issues have been posted before. #623 was closed but there is still other open (#782, #807) - including PR that might solve this issue (#782, #808).
Unfortunately we will have to disable NR while this is not solved leaving an unmonitored application.
The text was updated successfully, but these errors were encountered: