graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.Server.Prometheus

Description

Mutable references for Prometheus metrics.

These metrics are independent from the metrics in Hasura.Server.Metrics.

Synopsis

Documentation

makeDummyPrometheusMetrics :: IO PrometheusMetrics Source #

Create dummy mutable references without associating them to a metrics store.

newtype ConnectionsGauge Source #

A mutable reference for atomically sampling the number of websocket connections and number of threads forked by the warp webserver.

Because we derive the number of (non-websocket) HTTP connections by the difference of these two metrics, we must sample them simultaneously, otherwise we might report a negative number of HTTP connections.