Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
Remove unnecessary context manager layer
Browse files Browse the repository at this point in the history
Since `activate()` returns a context manager, we don't need to
construct another one.
  • Loading branch information
johananl committed Oct 14, 2019
1 parent 4cbf3dd commit f85c6aa
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ def unwrap(self):

return self._otel_tracer

@contextmanager
def start_active_span(
self,
operation_name,
Expand All @@ -175,8 +174,7 @@ def start_active_span(
start_time=start_time,
ignore_active_span=ignore_active_span,
)
with self._scope_manager.activate(span, finish_on_close) as scope:
yield scope
return self._scope_manager.activate(span, finish_on_close)

def start_span(
self,
Expand Down

0 comments on commit f85c6aa

Please sign in to comment.