Safe Haskell | None |
---|---|
Language | Haskell2010 |
Mutable references for Prometheus metrics.
These metrics are independent from the metrics in Hasura.Server.Metrics.
Synopsis
- data PrometheusMetrics = PrometheusMetrics {}
- data GraphQLRequestMetrics = GraphQLRequestMetrics {
- gqlRequestsQuerySuccess :: Counter
- gqlRequestsQueryFailure :: Counter
- gqlRequestsMutationSuccess :: Counter
- gqlRequestsMutationFailure :: Counter
- gqlRequestsUnknownFailure :: Counter
- gqlExecutionTimeSecondsQuery :: Histogram
- gqlExecutionTimeSecondsMutation :: Histogram
- data EventTriggerMetrics = EventTriggerMetrics {
- eventTriggerHTTPWorkers :: Gauge
- eventQueueTimeSeconds :: Histogram
- makeDummyPrometheusMetrics :: IO PrometheusMetrics
- makeDummyGraphQLRequestMetrics :: IO GraphQLRequestMetrics
- makeDummyEventTriggerMetrics :: IO EventTriggerMetrics
- newtype ConnectionsGauge = ConnectionsGauge (IORef Connections)
- data Connections = Connections {}
- newConnectionsGauge :: IO ConnectionsGauge
- readConnectionsGauge :: ConnectionsGauge -> IO Connections
- incWarpThreads :: ConnectionsGauge -> IO ()
- decWarpThreads :: ConnectionsGauge -> IO ()
- incWebsocketConnections :: ConnectionsGauge -> IO ()
- decWebsocketConnections :: ConnectionsGauge -> IO ()
- modifyConnectionsGauge :: (Connections -> Connections) -> ConnectionsGauge -> IO ()
Documentation
data PrometheusMetrics Source #
Mutable references for Prometheus metrics.
data GraphQLRequestMetrics Source #
GraphQLRequestMetrics | |
|
data EventTriggerMetrics Source #
EventTriggerMetrics | |
|
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.
data Connections Source #
incWarpThreads :: ConnectionsGauge -> IO () Source #
decWarpThreads :: ConnectionsGauge -> IO () Source #
incWebsocketConnections :: ConnectionsGauge -> IO () Source #
decWebsocketConnections :: ConnectionsGauge -> IO () Source #
modifyConnectionsGauge :: (Connections -> Connections) -> ConnectionsGauge -> IO () Source #