-
Notifications
You must be signed in to change notification settings - Fork 214
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
Add Redis pub/sub instrumentation #1129
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
@Sparkycz great work, thanks a lot for all your PRs! |
@@ -38,7 +38,8 @@ | |||
class RedisConnectionPoolInstrumentation(AbstractInstrumentedModule): | |||
name = "aioredis" | |||
|
|||
instrument_list = [("aioredis.pool", "ConnectionsPool.execute")] | |||
instrument_list = [("aioredis.pool", "ConnectionsPool.execute"), | |||
("aioredis.pool", "ConnectionsPool.execute_pubsub")] | |||
|
|||
def call(self, module, method, wrapped, instance, args, kwargs): |
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.
why is this function not marked as async? @beniwohli
@@ -73,7 +74,8 @@ def call(self, module, method, wrapped, instance, args, kwargs): | |||
class RedisConnectionInstrumentation(AbstractInstrumentedModule): | |||
name = "aioredis" | |||
|
|||
instrument_list = (("aioredis.connection", "RedisConnection.execute"),) | |||
instrument_list = (("aioredis.connection", "RedisConnection.execute"), | |||
("aioredis.pool", "ConnectionsPool.execute_pubsub")) | |||
|
|||
def call(self, module, method, wrapped, instance, args, kwargs): | |||
span = execution_context.get_span() |
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.
this is missing async_capture_span
call hence it would not create a span in APM. Also, I think this should also be async and return needs to have await with it @beniwohli @Sparkycz
* Add instrumentation of redis pub/sub commands * Add instrumentation of aioredis pub/sub commands Co-authored-by: Benjamin Wohlwend <beni@elastic.co>
closes #828