PlugInstrumenter v0.1.2 PipelineInstrumenter View Source

Instruments a plug pipeline using PlugInstrumenter.

This module can be use-d in a module to build an instrumented plug pipeline, similar to Plug.Builder:

defmodule MyPipeline do
  use PipelineInstrumenter

  plug Plug.Logger
end

Function plugs do not work. Each plug is wrapped with a PlugInstrumenter. Plug.Builder options are respected.

Options

  • :exclude - A list of plugs to exclude from instrumentation

Additional options will be passed through to each PlugInstrumenter in the pipeline that aren’t in the :exclude list.

Link to this section Summary

Functions

A macro that stores a new instrumented plug. opts will be passed unchanged to the plug

Link to this section Functions

Link to this macro plug(plug, opts \\ []) View Source (macro)

A macro that stores a new instrumented plug. opts will be passed unchanged to the plug.

Examples

plug Plug.Logger