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

feat(metrics): added metrics and peer_id endpoints #1699

Merged
merged 3 commits into from
Jul 12, 2023
Merged

Conversation

gurinderu
Copy link
Contributor

@gurinderu gurinderu commented Jul 11, 2023

Description

Added additional http endpoint for fetching peer_id

Motivation

Right now, people have to dig through nox's logs, which is hard.

Proposed Changes

  • metrics_port was renamed to http_port
  • added /metrics endpoint
  • added /peer_id endpoint

Screenshots (if applicable)

image

Additional Notes

  • peer_id becomes a required parameter for starting the node
  • instead of using hyper directly, I have decided to add the axum library. It is much simpler to define endpoints and it uses hyper
  • http_config is optional for the ability to disable HTTP API

Checklist

  • The code follows the project's coding conventions and style guidelines.
  • All tests related to the changes have passed successfully.
  • Documentation has been updated to reflect the changes (if applicable).
  • All new and existing unit tests have passed.
  • I have self-reviewed my code and ensured its quality.
  • I have added/updated necessary comments to aid understanding.

Reviewer Checklist

  • Code has been reviewed for quality and adherence to guidelines.
  • Tests have been reviewed and are sufficient to validate the changes.
  • Documentation has been reviewed and is up to date.
  • Any questions or concerns have been addressed.

@linear
Copy link

linear bot commented Jul 11, 2023

NET-182 Add /peer_id HTTP endpoint

So that it is easy to learn PeerId of the nox instance

Right now, people have to dig through nox's logs, which is hard to teach

@gurinderu gurinderu marked this pull request as ready for review July 11, 2023 12:28
@gurinderu gurinderu added the e2e Run e2e workflow label Jul 12, 2023
nox/src/http.rs Show resolved Hide resolved
nox/src/node.rs Show resolved Hide resolved
Co-authored-by: Aleksey Proshutisnkiy <justprosh@users.noreply.github.com>
@gurinderu gurinderu merged commit c42b919 into master Jul 12, 2023
16 checks passed
@gurinderu gurinderu deleted the feature/net-182 branch July 12, 2023 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants