Skip to content

Commit

Permalink
Implement missing context methods
Browse files Browse the repository at this point in the history
Fixes #321
  • Loading branch information
ocelotl committed Mar 3, 2021
1 parent 7980997 commit 88d8d6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from opentelemetry import trace
from opentelemetry.context import attach, detach
from opentelemetry.propagate import extract
from opentelemetry.trace.propagation.textmap import DictGetter
from opentelemetry.propagators.textmap import DictGetter
from opentelemetry.trace.status import Status, StatusCode

logger = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ def close(self):

def __enter__(self):
"""Enters the runtime context related to the channel object."""
raise NotImplementedError()
return self

def __exit__(self, exc_type, exc_val, exc_tb):
"""Exits the runtime context related to the channel object."""
raise NotImplementedError()
self.close()


def intercept_channel(channel, *interceptors):
Expand Down

0 comments on commit 88d8d6e

Please sign in to comment.