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

Use /status endpoint, not /peers #5243

Open
mversic opened this issue Nov 19, 2024 · 0 comments
Open

Use /status endpoint, not /peers #5243

mversic opened this issue Nov 19, 2024 · 0 comments

Comments

@mversic
Copy link
Contributor

mversic commented Nov 19, 2024

          > I see that we have `/status` and `/metrics`. I'm not sure why we have both since, from what I can see, `/status` is a superset of `/metrics. Considering this, I can make it so that peers are returned on one of those endpoints instead of adding a new point. I implemented this functionality on a separate endpoint because:
1. there can be lots of peers returned and we may want to batch this response

2. we don't want the client to pay the price of retrieving this long list of peers if they are interested in simple metric

Well, in fact, the /status endpoint already supports selective retrieval (see sub-routing in the reference), i.e. GET /status/peers "just works" already. I would say introducing a new route is not as nice as reusing the current one.

What do you think?

Originally posted by @0x009922 in #5235 (comment)

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

No branches or pull requests

1 participant