Skip to content

Metrics API (like Health API) #551

Open
@adria0

Description

@adria0

Openethereum needs to add prometheus metrics https://github.com/openethereum/openethereum/issues/11725, and I am looking for the best option to do it.

I realized about the health API, but we cannot use it for now:

  1. There is no way to define more that one endpoint for it
  2. We cannot use or modify the current /api/health path because it could break current user's monitorization tools.
  3. We need to output text instead json (string without " and no carriage return escapes)

I would like to purpose extending the functionality of health_api in the following way, without introducing any breaking change in the current api:

  • add a method .raw_api(path,rpc_method) in the builder, which allows to dump the result as Vec without JSONify.
  • allow multiple raw api handlers

I am aware that this breaks a little the spirit of a json-based library but opens the possibility to handle this case, but also in a very flexible way that could help other future use cases.

If something like this is ok, I can write the feature and do a PR for it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions