but...
import opentracing
from grpc_opentracing import open_tracing_client_interceptor
from grpc_opentracing.grpcext import intercept_channel
from grpc import insecure_channel
ic = open_tracing_client_interceptor(opentracing.global_tracer())
with intercept_channel(insecure_channel("localhost:5000"), ic) as ch:
pass # blabla
Traceback (most recent call last):
File "testwith.py", line 7, in <module>
with intercept_channel(insecure_channel("localhost:5000"), ic) as ch:
AttributeError: __enter__
grpc channel is usually used with
withstatement like here -> https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_client_with_options.py#L31but...