alibaba / arthas

Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas
https://arthas.aliyun.com/
Apache License 2.0
35.7k stars 7.51k forks source link

Add support for gRPC #2914

Closed fengye404 closed 3 weeks ago

fengye404 commented 1 month ago

Add support for gRPC, enabling unary calls and bidirectional streaming calls, while excluding any dependencies related to gRPC-netty.

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.

hengyunabc commented 1 month ago

pom.xml 里需要配置:

    <profiles>
        <profile>
            <id>mac</id>
            <activation>
                <os>
                    <family>mac</family>
                </os>
            </activation>
            <properties>
                <os.detected.classifier>osx-x86_64</os.detected.classifier>
            </properties>
        </profile>
    </profiles>
hengyunabc commented 1 month ago

https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md

  1. 据 grpc 规范,有很多 header 没有处理,比如 grpc-timeout , authorization 需要支持最简单的 Bearer 。
  2. 在 GrpcRequest 对象里没有 http header,用户如果想处理自定义的 header ,没办法处理。
  3. 没有看到在 server端返回 Trailers 相关的
Status → "grpc-status" 1*DIGIT ; 0-9
Status-Message → "grpc-message" Percent-Encoded
Status-Details → "grpc-status-details-bin" {base64 encoded value} ; See notes below.