Skip to content

Commit

Permalink
Update gRPCContext wrapper class (#420)
Browse files Browse the repository at this point in the history
There are a few cases where one needs to dig into `grpc.ServicerContext`
objects, and these fields were missing from our wrapper, which can cause
issues with implmementation.
  • Loading branch information
alertedsnake committed Apr 13, 2021
1 parent 658f9ca commit e7d26a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#387](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/387))
- Update redis instrumentation to follow semantic conventions
([#403](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/403))
- Update gRPC instrumentation to better wrap server context
([#420](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/420))

### Added
- `opentelemetry-instrumentation-urllib3` Add urllib3 instrumentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def __init__(self, servicer_context, active_span):
self.details = None
super().__init__()

def __getattr__(self, attr):
return getattr(self._servicer_context, attr)

def is_active(self, *args, **kwargs):
return self._servicer_context.is_active(*args, **kwargs)

Expand Down

0 comments on commit e7d26a4

Please sign in to comment.