(for posterity)
There are (at least) three routes we can go with this:
stats.Handler. This is what ocgrpc does.UnaryClientInterceptor, StreamClientInterceptor, UnaryServerInterceptor, and StreamServerInterceptor). This is what both opentracing go-grpc and otgrpc do.stats.Handler exposes details such as the uncompressed and wire length of the payload, which aren't accessible through the interceptors.
On the other hand, the stream interceptors enable us to observe individual messages within the stream, rather than treating the whole stream as a single payload. stats.Handler doesn't facilitate this granularity. (Note that neither opentracing package currently does anything per-message, although it would probably be quite useful for many streaming use cases.)
Thoughts?
ETA: As far as consistency across languages goes, I don't believe that any other languages support an equivalent to stats.Handler. Some, but not all, support interceptors.
Is it possible to associate different traces for each payload in case of stream interceptors? Otherwise long lived stream could end up having one parent creating 100s or 1000s of child span.
Can we support both with an option flag?
Decision on the above, based on today's SIG, is to with interceptors at least for now. Longer term, we may do a combination of both.
Closing this for now as I believe it makes sense to start with the converted Datadog gRPC plugin (as discussed in last week's SIG meeting), which we should be able to make public soon.
Any updates about otgrpc plugin?
Why was this issue closed? I think the decision to go through interceptors is a implementation detail but the feature request to create an interceptor/plugin still applies, right?
reopening this as requested above.
I am currently implementing those interceptors for our company. I'll send a PR as soon as they're ready.
The attached PR #621, addresses tracing but does not implement stats. Is there a roadmap to including the stats plugin in opentelemetry. Is there an Issue that tracks it, or we could re-open this one?
@rghetia @jmacd
@sudeep-ib please open a new issue for stats.
Most helpful comment
I am currently implementing those interceptors for our company. I'll send a PR as soon as they're ready.