Telemetry support
It would be good if have telemetry support for this library. I'm not sure if interceptor is a good fit but we can start from that.
I think some default interceptors would do just fine, although perhaps we can have events being published directly by the core server and client functions.
I would have something like [:grpc, :server, ...] and [:grpc, :client, ...] for the event names.
What do you propose we publish through telemetry? I think we should decide what events we want and then we can look at how to implement them
I want to start something simple like execution time such as [:grpc, :server, :start], [:grpc, :server, :stop], [:grpc, :client, :start] and [:grpc, :client, :stop]. (Event prefix can be change). This could use :telemetry.span to wrap this process.
I would prototype this feature to see how it going and discuss a bit more in details. :)
Those make sense, although I would use [:grpc, :server, :request] as the name of the event (to which telemetry span would append start and stop and exception).
I think we should include the stream as part of the metadata. I think it's basically a mixture of what Tesla and Phoenix do with Telemetry.
Since client-server connections aren't necessarily related to each request, we should perhaps add separate events for connect and disconnect on both sides as well
@wingyplus to be clear, I think we're ready for a PR on these events :) Ideally we don't do it using the adapters so that we can ensure the events are published regardless of the adapter used
Yeah. I’ll looking into it after setup ci is done. :)
As a point of reference, I'll work to publish events so we can export all metrics that grpc_prometheus currently exports