• Sean McGivern's avatar
    Record connection pool metrics · 08cb1865
    Sean McGivern authored
    Add a sampler for the `#stat` method of a connection pool, and record
    those stats in Prometheus. This applies to all stats except
    `checkout_timeout`, which is really more of a configuration item. It
    also applies to all database connections we use: the main one, the Geo
    tracking database, and any connection pools for database load balancing
    hosts.
    
    This requires a fix to Geo::TrackingBase.connected?, which wasn't
    correctly reporting the connection's status.
    08cb1865
7_prometheus_metrics.rb 4.02 KB