Skip to content

Commit 3e1a9fa

Browse files
authored
Implement missing context methods (#363)
1 parent ca8eac6 commit 3e1a9fa

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222

2323
## [0.19b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.19b0) - 2021-03-26
2424

25+
- Implement context methods for `_InterceptorChannel`
26+
([#363](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/363))
27+
2528
### Changed
2629
- Rename `IdsGenerator` to `IdGenerator`
2730
([#350](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/350))

instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/grpcext/_interceptor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ def close(self):
232232

233233
def __enter__(self):
234234
"""Enters the runtime context related to the channel object."""
235-
raise NotImplementedError()
235+
return self
236236

237237
def __exit__(self, exc_type, exc_val, exc_tb):
238238
"""Exits the runtime context related to the channel object."""
239-
raise NotImplementedError()
239+
self.close()
240240

241241

242242
def intercept_channel(channel, *interceptors):

0 commit comments

Comments
 (0)