New Relixir v0.2.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.
connshould be aPlug.Connthat has been configured byNewRelixir.Plug.Phoenix.actionis the name of the repository method being instrumented.queryableis theQueryablebeing 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.