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:
|
entity = response.entity.transformDataBytes( |
there is a use of transformDataBytes, which throws
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?