Open ezinall opened 1 year ago
I think the behaviour of code
was fixed in https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1578 .
There is an arity issue with abort
for the AIO servicer context which is probably caused by the inheritance mismatch mentioned here. I'll raise a separate issue for that.
@cookiefission can i close issue?
Describe your environment Describe any aspect of your environment relevant to the problem, including your Python version, platform, version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main.
Steps to reproduce Make grpc aio server interceptor Try to get status code from context in interceptor
What is the expected behavior? https://grpc.github.io/grpc/python/grpc.html?highlight=servicercontext#grpc.ServicerContext.code Get the code by context.code()
What is the actual behavior? TypeError: 'StatusCode' object is not callable
Additional context class opentelemetry.instrumentation.grpc._server._OpenTelemetryServicerContext doesn't have code method but have code preperty. And _OpenTelemetryServicerContext inherits grpc.ServicerContext instead of grpc.aio.ServicerContext