From 36877b5e902396a3385a91b4aa9bb72e1a0a6807 Mon Sep 17 00:00:00 2001 From: Michael Stella Date: Thu, 29 Oct 2020 14:51:33 -0400 Subject: [PATCH] update post-rebase --- .../src/opentelemetry/instrumentation/grpc/_server.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 59bd28e2ff9..0de94ac1921 100644 --- a/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/_server.py +++ b/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/_server.py @@ -29,7 +29,7 @@ from opentelemetry import propagators, trace from opentelemetry.context import attach, detach -from opentelemetry.trace.status import Status, StatusCanonicalCode +from opentelemetry.trace.status import Status, StatusCode logger = logging.getLogger(__name__) @@ -115,7 +115,7 @@ def abort(self, code, details): self.details = details self._active_span.set_status( Status( - canonical_code=StatusCanonicalCode(code.value[0]), + canonical_code=StatusCode(code.value[0]), description=details, ) ) @@ -130,7 +130,7 @@ def set_code(self, code): details = self.details or code.value[1] self._active_span.set_status( Status( - canonical_code=StatusCanonicalCode(code.value[0]), + canonical_code=StatusCode(code.value[0]), description=details, ) ) @@ -140,7 +140,7 @@ def set_details(self, details): self.details = details self._active_span.set_status( Status( - canonical_code=StatusCanonicalCode(self.code.value[0]), + canonical_code=StatusCode(self.code.value[0]), description=details, ) )