Ghost/ghost/prometheus-metrics
Chris Raible 6d9ea91634
Added utilities for creating custom prometheus metrics (#21614)
ref
https://linear.app/ghost/issue/ENG-1771/add-utility-functions-to-easily-create-custom-metrics

- Currently adding custom metrics to our prometheus client requires you
to directly access the `prometheusClient.client` to create the metrics
- This isn't super convenient, as you then have to either keep the
metric in a local variable, or manually get it from the
`prometheusClient.client.register`
- This commit exposes some utility functions for registering metrics on
the `prometheusClient` class, and for retrieving metrics that have
already been registered
2024-11-13 16:21:49 -08:00
..
src Added utilities for creating custom prometheus metrics (#21614) 2024-11-13 16:21:49 -08:00
test Added utilities for creating custom prometheus metrics (#21614) 2024-11-13 16:21:49 -08:00
.eslintrc.js Added ability to push prometheus metrics to a pushgateway (#21526) 2024-11-05 11:50:39 -08:00
package.json Added connection pool metrics to prometheus client (#21576) 2024-11-07 23:01:34 -08:00
README.md Added ability to push prometheus metrics to a pushgateway (#21526) 2024-11-05 11:50:39 -08:00
tsconfig.json Added ability to push prometheus metrics to a pushgateway (#21526) 2024-11-05 11:50:39 -08:00

Metrics Server

A standalone server for exporting prometheus metrics from Ghost

Usage

Develop

This is a monorepo package.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Test

  • yarn lint run just eslint
  • yarn test run lint and tests