new_relic v0.2.0 NewRelic.Plug.Instrumentation
Utility methods for instrumenting parts of an Elixir app.
Link to this section Summary
Functions
Instruments a database call and records the elapsed time.
Link to this section Functions
Link to this function
instrument_db(action, queryable, opts, f)
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 byNewRelic.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.