New Relixir v0.1.0 NewRelixir.Plug.Instrumentation
Utility methods for instrumenting parts of an Elixir app.
Summary
Functions
Instruments a database call and records the elapsed time
Functions
Specs
instrument_db(atom, Ecto.Queryable.t, Keyword.t, (... -> any)) :: any
Instruments a database call and records the elapsed time.
conn
should be aPlug.Conn
that has been configured byNewRelixir.Plug.Phoenix
.action
is the name of the repository method being instrumented.queryable
is theQueryable
being passed to the repository.
By default, the query name will be infered from queryable
and action
. This can be overriden
by providing a :query
option in opts
.