-
Notifications
You must be signed in to change notification settings - Fork 19
Add support for akka-grpc #60
Comments
Hey, sounds very interesting. I think we would be happy about that contribution! |
Ah okay, yep having looked through the history I see it used to be what I suggested, and got updated. For a bit of context, akka-gRPC is currently using the akka-http server (running http2), and a wrapper around the gRPC default netty-based client for now. In my example, to get the server traced I made a copy of the I think the problem I've seen is more general than just akka-gRPC, in that any chunked response with trailer headers in the last chunk will throw this error, but I'm guessing that is quite rare. I couldn't find an immediate solution to this, but a few potential ones which you may have a better idea on :)
It looks to me like having a akka-grpc module which starts with the simple option and then working towards finding a way of having a handler/callback on the Entity being consumed could work, but you may have a better idea of how easy/difficult having that handler could be |
Mh also not sure if it is possible without |
@aperkins1310 I just saw that I totally missed to follow up on this one. If you are still interesting in adding an |
Hi all,
Would you consider adding support for akka-gRPC? I've given it a bit of a try and to get something working was fairly straightforward, but I did come across one issue so far, which it would be nice to get your input on.
At the moment in:
opencensus-scala/akka-http/src/main/scala/io/opencensus/scala/akka/http/utils/EndSpanResponse.scala
Line 37 in a97018d
an IllegalArgumentException when using gRPC. https://github.com/akka/akka-http/blob/3feb8b617bddaae28bf85c08bb2fc1f5c6901c8c/akka-http-core/src/main/scala/akka/http/scaladsl/model/HttpEntity.scala#L504
As far as I can tell, it is only used to finish the span in case of upstream failure or finish within the request -> response stream, and doesn't actually transform the bytes at all.
Therefore in EndSpanResponse, could those lines be switched for a simple:
tracing.endSpan(span, StatusTranslator.translate(response.status.intValue())) response
The tests all pass, as I believe upstream failures or finishes are covered by other paths, but wanted to get your opinion as I may be missing something.
Once that’s cleared up I’d be happy to work towards an akka-grpc module, if that's something you'd be interested in?
The text was updated successfully, but these errors were encountered: