Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ApplicationMetrics
- applicationMetrics :: MonadIO m => Labels -> RegistryT m ApplicationMetrics
- countStatusCode :: ApplicationMetrics -> Int -> IO ()
- observeDuration :: ApplicationMetrics -> Double -> IO ()
- instrumentApplication :: ApplicationMetrics -> Middleware
Documentation
data ApplicationMetrics Source #
applicationMetrics :: MonadIO m => Labels -> RegistryT m ApplicationMetrics Source #
Set up the metrics for HTTP response codes and request handling durations. We identify the response code counters
by http_requests_total
with codes labeled by http_response_code
. We identify the duration histogram by
http_request_duration_milliseconds
Use labels to identify your particular application.
countStatusCode :: ApplicationMetrics -> Int -> IO () Source #
Increment the count for a specific status code, by number
observeDuration :: ApplicationMetrics -> Double -> IO () Source #
Add a request duration observation in ms
instrumentApplication :: ApplicationMetrics -> Middleware Source #
This middleware adds response code tracking and request duration statistics for the application, aggregating across all requests