You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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
The text was updated successfully, but these errors were encountered:
I think the behaviour of code was fixed in #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.
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
The text was updated successfully, but these errors were encountered: