-
Notifications
You must be signed in to change notification settings - Fork 624
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
Value of trace_configs might be None #1592
Value of trace_configs might be None #1592
Conversation
|
@@ -280,7 +280,7 @@ def instrumented_init(wrapped, instance, args, kwargs): | |||
if context_api.get_value(_SUPPRESS_INSTRUMENTATION_KEY): | |||
return wrapped(*args, **kwargs) | |||
|
|||
client_trace_configs = list(kwargs.get("trace_configs", ())) | |||
client_trace_configs = list(kwargs["trace_configs"] or []) |
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.
If trace_configs did not exist in kwargs the code throws a KeyError exception, so you need to verify this and use kwargs.get().
client_trace_configs = list(kwargs.get("trace_configs") or [])
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!
3a8e36d
to
1dbffc9
Compare
Please add CHANGELOG entry |
Done! |
Thanks @estheruary for fixing my bug 🙏 |
Description
Ran into this in the wild,
trace_configs
might be None.Type of change
Please delete options that are not relevant.
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.