Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: support gRPC reflection #3417

Closed
esnible opened this issue Nov 29, 2021 · 3 comments · Fixed by #3526
Closed

Idea: support gRPC reflection #3417

esnible opened this issue Nov 29, 2021 · 3 comments · Fixed by #3526

Comments

@esnible
Copy link
Contributor

esnible commented Nov 29, 2021

Requirement - what kind of business use case are you trying to solve?

I was running a Jaeger, but didn't know if it supported v3 Query API or not.

Problem - what in Jaeger blocks you from solving the requirement?

It is difficult to know the versions and APIs supported by the gRPC endpoint of a running Jaeger query instance.

Proposal - what do you suggest to solve the problem or improve the existing situation?

It takes one line of code to support list. See https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md#enable-server-reflection

Any open questions to address

  • Every service isn't required to support introspection. It is more of an aid for tools and troubleshooting.
  • After rebuilding adding the line of code suggested above, grpcurl -plaintext localhost:16685 list works great! Unfortunately grpcurl -plaintext localhost:16685 describe doesn't, probably because of the reasons discussed at https://jbrandhorst.com/post/gogoproto/#reflection . It is unclear if it is worth the trouble needed to get describe working.
@yurishkuro
Copy link
Member

+1

@pavolloffay
Copy link
Member

I wonder if there is any perf impact, if there is we should probably enable it via a flag.

@esnible
Copy link
Contributor Author

esnible commented Nov 29, 2021

The performance impact should be close to zero. Adding reflection means increasing the gRPC method hash table from about 10 to about 12 entries and calling code from a module we already include if the gRPC method is "list" or "describe".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants