bradleyjkemp/grpc-tools

Document grpc-dump output format

bradleyjkemp opened this issue · 5 comments

Without a proper specification of the dump output format it's hard for users to write parsers, etc. for the output of grpc-dump.

I think it would be useful to also have some sample jq expressions for people to get started with. I can help out with that if you'd like. :)

This would be great 🙂 I was thinking about having a full walkthrough using something like https://grpcweb.jbrandhorst.com/ as an example so this would fit in very nicely.

What example expressions were you thinking of? Off the top of my head maybe we could have: filtering for requests that returned an error, filtering for requests for a specific service/method, and some sort of counting/summarisation?

Things like filtering for metadata, the client response, the server, first element of a repeated series. I will make a tiny pr tonight and throw it in for some help. If there are other things that you are looking to add and want some help i'd be keen, i wanted to build something similar to what you did here for quite some time now actually 👍

Very happy to accept help. In the short term I'm going to do some hardening against misconfiguration e.g. this TODO:

// TODO: verify that this destination doesn't resolve to the proxy itself

But feature-wise, adding support for the gRPC reflection API would be really useful. grpc-dump already has some support for loading protos to use to convert requests to JSON but being able to load these from the destination would be a much nicer experience. Would you be interested in looking at that?

Also looking for some good ideas on how to solve #6 but it seems quite a tricky one...

Yes, actually i have been looking into the reflection api in the past couple of weeks for some things at work. Happy to go deeper on that :) About #6 give me a bit of time to get the context.