0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00
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
package.json Added connection pool metrics to prometheus client (#21576) 2024-11-07 23:01:34 -08:00
README.md
tsconfig.json

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