The interceptor API for AsyncIO is different than the normal interceptor 
API. AsyncIO requires the method signatures to pass on "async"-ness from 
function to function.

If there is an AsyncIO metrics library, it should be possible to integrate 
with gRPC AsyncIO. However, if there isn't, the metrics library is likely 
to be using transports (gRPC, HTTP). The IO from transport is blocking, and 
will be harder to integrate into the AsyncIO world.

On Monday, February 14, 2022 at 7:41:14 AM UTC-8 adria...@sky.uk wrote:

> We are converting existing Python gRPC services to the Python gRPC AsyncIO 
> version (1.43.1). We currently use the py-grpc-prometheus package to 
> collect/emit server and client metrics. This packages subclasses:
> ```
> class PromServerInterceptor(grpc.ServerInterceptor): 
>
> class PromClientInterceptor(grpc.UnaryUnaryClientInterceptor, 
> grpc.UnaryStreamClientInterceptor, grpc.StreamUnaryClientInterceptor, 
> grpc.StreamStreamClientInterceptor):
> ```
>  and uses a number of other gRPC package attributes, etc.
>
> The question is, are the blocking and asyncio classes 'compatible' when 
> used in this way? If not, any suggestions on alternative ways of collecting 
> server/client request/response metrics?
>
> Thank you:)
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/82935abc-e0ce-48e2-b319-e4d5a421d988n%40googlegroups.com.

Reply via email to