Skip to content
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

feat(redis): Add instrumentation for redis pipeline #1543

Merged
merged 11 commits into from
Aug 11, 2022

Conversation

jjbayer
Copy link
Member

@jjbayer jjbayer commented Aug 5, 2022

Add automatic instrumentation of redis pipelining for both redis and rediscluster.

Note: This does not add instrumentation for StrictRedisCluster.

@jjbayer jjbayer requested review from untitaker and beezz August 5, 2022 11:40
Copy link
Member

@untitaker untitaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaving final review and approval to sdk folks, just some comments

sentry_sdk/integrations/redis.py Outdated Show resolved Hide resolved

def _parse_redis_command(command):
# type: (Any) -> str
return " ".join(map(str, command[0]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would align this with the code at the bottom of this file. there we use repr instead of str and no list comprehension/slicing. Perhaps you find a way to factor this out.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I factored out the constant.

sentry_sdk/integrations/redis.py Outdated Show resolved Hide resolved
sentry_sdk/integrations/redis.py Show resolved Hide resolved

def _parse_redis_command(command):
# type: (Any) -> str
return " ".join(map(str, command[0]))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I factored out the constant.

sentry_sdk/integrations/redis.py Outdated Show resolved Hide resolved
sentry_sdk/integrations/redis.py Show resolved Hide resolved
sentry_sdk/integrations/redis.py Show resolved Hide resolved
@jjbayer jjbayer marked this pull request as ready for review August 8, 2022 09:59
@jjbayer jjbayer requested a review from a team August 8, 2022 09:59
@sl0thentr0py sl0thentr0py self-assigned this Aug 8, 2022
Copy link
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx @jjbayer cool stuff!
just a question / nit about the Strict.. renaming mess

sentry_sdk/integrations/redis.py Outdated Show resolved Hide resolved
tests/integrations/rediscluster/test_rediscluster.py Outdated Show resolved Hide resolved
@jjbayer jjbayer requested a review from sl0thentr0py August 11, 2022 11:09
Copy link
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx, lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants