Support for opentelemetry
refer https://opentelemetry.io/docs/specs/semconv/rpc/json-rpc/
Can you say more about what you have in mind here?
OpenTelemetry is a collection of APIs, SDKs, and tools. Use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) to help you analyze your software’s performance and behavior.
go sdk support trace and metric currently. and spec defines some standard attribute in here https://opentelemetry.io/docs/specs/semconv/rpc/json-rpc/
we can add some hook func to export low level data to outer, like go-redis. and make use of it to do tracing
Where do you imagine these hooks would go? Given that the telemetry metrics are already per request, this seems like something that could be handled by user-defined middleware. It's not clear to me that the library needs any special features to support it.
this seems like something that could be handled by user-defined middleware.
do you mean wrapping jrpc2.Handler? it's used in server-side.
middleware (or filter) may used in client-side.
this seems like something that could be handled by user-defined middleware.
do you mean wrapping
jrpc2.Handler? it's used in server-side.middleware (or filter) may used in client-side.
Yes, if the client needs to forward something to the server, it would have to do so by including it in the parameters anyway, since that's the only place the protocol has space for data. On the server side (or in callbacks) one can inject a wrapper that captures those data.