how to add ServerInterceptor like java for grpc server (python)

121 views
Skip to first unread message

Ryan Qian

unread,
Oct 30, 2016, 11:47:54 PM10/30/16
to grpc.io
In java, I can add ServerInterceptor to grpc server, does Python have similar way?

I need add stasd, sentry, zipkin ... support for Python grpc server. 

Thanks!
-Ryan
Message has been deleted

Nathaniel Manista

unread,
Oct 31, 2016, 12:16:43 PM10/31/16
to Ryan Qian, grpc.io
On Sun, Oct 30, 2016 at 8:53 PM, Ryan Qian <ryan...@gmail.com> wrote:
seems I should use add_generic_rpc_handlers

Yes.

On Monday, October 31, 2016 at 11:47:54 AM UTC+8, Ryan Qian wrote:
In java, I can add ServerInterceptor to grpc server, does Python have similar way?

Python does not have a dedicated mechanism exactly analogous to ServerInterceptor, but it should be possible to achieve the behavior you desire using (a) GenericRpcHandler implementation(s).

I need add stasd, sentry, zipkin ... support for Python grpc server.

If in the course of implementing your system you find yourself feeling "it would have really been nice if the gRPC Python API did/had/offered [...]", please feel encouraged to file a feature request.
-Nathaniel

Ryan Qian

unread,
Nov 1, 2016, 5:55:22 AM11/1/16
to grpc.io, ryan...@gmail.com
Thank you Nathaniel.
Reply all
Reply to author
Forward
0 new messages