diff --git a/CHANGELOG.md b/CHANGELOG.md index 07e271e715..7fdfff350a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/_server.py b/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/_server.py index 5321964a19..39ff47f278 100644 --- a/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/_server.py +++ b/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/_server.py @@ -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)