metrics-wai-0.5.7: Metrics WAI integration
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Metrics.Middleware.Prometheus

Synopsis

Documentation

waiPrometheusMiddlewarePaths :: Paths -> Middleware Source #

Helper function that should only be needed as long as we have wai-routing code left in proxy: run treeToPaths on old routing tables and routeToPaths on the servant ones, and feed both to this function.

normalizeWaiRequestRoute :: Paths -> Request -> Text Source #

Compute a normalized route for a given request. Normalized routes have route parameters replaced with their identifier e.g. user1234 might become useruserid