Conduit icon indicating copy to clipboard operation
Conduit copied to clipboard

Prometheus Metrics Support

Open mihavo opened this issue 3 years ago • 0 comments

What kind of change does this PR introduce? This PR adds support for metrics collection. Each module collects a variety of default metrics (e.g. request latencies, gRPC errors, admin/client requests etc.). In addition to these defaults every module also records and collects some custom metrics regarding its function. For instance the authentication module records any login requests that have been sent.

Each module exposes a Prometheus compatible endpoint /metrics, providing support for Prometheus scraping. To enable metrics, each module must be provided with a METRICS_PORT env key for the Express server port.

Metrics collection is totally optional and can be enabled to some or all of the modules.

  • [ ] Bugfix
  • [x] Feature
  • [ ] Code style update
  • [ ] Refactor
  • [ ] Build-related changes
  • [ ] Other (please describe)

Does this PR introduce a breaking change?

  • [ ] Yes
  • [x] No

The PR fulfills these requirements:

  • [x] It's submitted to the main branch
  • [ ] When resolving a specific issue, it's referenced in the PR's description (e.g. fix #xxx, where "xxx" is the issue number)

mihavo avatar Aug 11 '22 15:08 mihavo