-
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
feat: Respect "suppress_instrumentation" in redis instrumentor #2064
base: main
Are you sure you want to change the base?
Conversation
@@ -182,6 +183,11 @@ def _traced_execute_command(func, instance, args, kwargs): | |||
query = _format_command_args(args) | |||
name = _build_span_name(instance, args) | |||
|
|||
if context.get_value( | |||
_SUPPRESS_INSTRUMENTATION_KEY | |||
): |
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.
There is a function called is_instrumentation_enabled
in the opentelemetry.instrumentation.utils
module that should be used instead of accessing _SUPRESS_INSTRUMENTATION_KEY directly.
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.
Thanks, I've addressed this. I'd like to run the tests but I can't figure out how to do so, the tox
command just goes into an error loop (MacOS). Can you help?
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.
Without knowing what arguments you are passing and what error you are getting it's hard to give any specific suggestion.
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.
No arguments, #2330
instrumentation/opentelemetry-instrumentation-redis/tests/test_redis.py
Outdated
Show resolved
Hide resolved
...tion/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py
Outdated
Show resolved
Hide resolved
Sorry for the commit spam - I'm just reviewing myself as best I can while not being able to run the tests locally. Do you have some guide how to get that up and running, preferably in the IDE and not |
@federicobond are we good to go here? |
@martimors please take a look at the failures. The only way we can run tests is by using |
Description
Fixes #2057
I'll wait until I get some feedback to update the changelog and the docs if need be.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.