Ghost/ghost/prometheus-metrics
Chris Raible d89c7d5f25
Added metric for time to create a database connection (#21696)
ref
https://linear.app/ghost/issue/ENG-1783/add-time-to-create-connection-metric

- Since we've added the "time to acquire" metric to get visibility into
contention in the connection pool, we've seen some anomalies where it
takes a surprisingly long time to acquire a connection (~60ms) when not
under load. Hypothesis is that these anomalies occur when there aren't
any open connections, so Ghost has to establish a new connection with
the DB, and that's the part that's actually taking most of that time.
This new metric should help confirm/deny that hypothesis.
- This will also be an interesting metric to keep an eye on and/or alert
on — if Ghost can't create new connections with its database
performantly, it's not going to perform very well.
2024-11-22 00:26:04 -08:00
..
src Added metric for time to create a database connection (#21696) 2024-11-22 00:26:04 -08:00
test Added metric for time to create a database connection (#21696) 2024-11-22 00:26:04 -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