Skip to content

Commit

Permalink
Tracing: fixed bug so tracing won't wrap None functions (Azure#7451)
Browse files Browse the repository at this point in the history
* fixed bug so tracing won't wrap None functions

* added opencensus threading package to dev requirements
  • Loading branch information
iscai-msft authored and yijxie committed Oct 9, 2019
1 parent 09a0823 commit 61c6c7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/core/azure-core/azure/core/tracing/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def with_current_context(func):
:return: The target the pass in instead of the function
"""
span_impl_type = settings.tracing_implementation() # type: Type[AbstractSpan]
if span_impl_type is not None:
if span_impl_type is None:
return func

return span_impl_type.with_current_context(func)
1 change: 1 addition & 0 deletions sdk/core/azure-core/dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ aiodns>=2.0; python_version >= '3.5'
typing_extensions>=3.7.2
opencensus>=0.6.0
opencensus-ext-azure>=0.3.1
opencensus-ext-threading
mock

0 comments on commit 61c6c7e

Please sign in to comment.