Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Add support for akka-grpc #60

@aperkins1310

Description

@aperkins1310

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:

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions