Glia.StatsPlug

This Plug is meant to help collect statistics about the time it takes your application to process HTTP requests. It emits a value for the processing time after every processed HTTP request.

The backend needs to provide a histogram function that the Plug uses to send the metrics over. This function’s behavior is described in PlugStats.Behaviours.Backend.

The metric emitted is called “web.request” (configurable) and contains the following tags:

Installation

The package can be installed by adding stats_plug to your list of dependencies in mix.exs:

def deps do
  [
    {:stats_plug, "~> 1.0.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. The docs can be found at https://hexdocs.pm/stats_plug.