Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- prometheusMiddleware :: (Label mLatencyLabel, Label mActiveLabel, HasEndpoint api) => Metrics mLatencyLabel mActiveLabel -> Proxy api -> Middleware
- data Metrics mLatencyLabel mActiveLabel = Metrics {
- mLatency :: RequestLatencyMetric mLatencyLabel
- mGetLatencyLabels :: Endpoint -> Status -> mLatencyLabel
- mActive :: ActiveRequestsMetric mActiveLabel
- mGetActiveLabels :: Endpoint -> mActiveLabel
- defaultMetrics :: Metrics Label3 Label2
- type RequestLatencyMetric l = Vector l Histogram
- type ActiveRequestsMetric l = Vector l Gauge
Documentation
prometheusMiddleware :: (Label mLatencyLabel, Label mActiveLabel, HasEndpoint api) => Metrics mLatencyLabel mActiveLabel -> Proxy api -> Middleware Source #
Middleware
to observe Metrics
.
data Metrics mLatencyLabel mActiveLabel Source #
Supported metrics and a function to get relevant labels from Endpoint
.
Metrics | |
|
type RequestLatencyMetric l = Vector l Histogram Source #
Request latency metric parametrized with some label l
.
type ActiveRequestsMetric l = Vector l Gauge Source #
Active requests metric parametrized with some label l
.