-
Notifications
You must be signed in to change notification settings - Fork 626
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
adding response_hook to redis instrumentor #669
Conversation
14b88eb
to
7fc376e
Compare
) | ||
return func(*args, **kwargs) | ||
def _instrument( | ||
tracer, response_hook: _ResponseHookT = None, |
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.
Should there be a request_hook
callback as well? A callable that is executed before the request is made, similar to the hooks in http instrumentaitons.
@@ -41,8 +41,8 @@ | |||
API | |||
--- | |||
""" |
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.
Could you add an example usage of the hooks in the docstrings?
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.
done.
8b72ee1
to
8177f26
Compare
Description
opentelemetry-instrumentation-redis
: added response_hook callback passed as an argument to the instrument method, enabling the users to add data from the response to the span attributesType of change
Please delete options that are not relevant.
How Has This Been Tested?
test_response_hook
- a new unit test testing the hook activationDoes This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.