AppSignal v1.0.0 Appsignal.Instrumentation.Helpers
Helper functions and macros to instrument function calls.
Summary
Functions
Execute the given function in start / finish event calls. See instrument/6
Execute the given function in start / finish event calls. See instrument/6
Execute the given function in start / finish event calls
Types
Functions
instrument(arg, name, title, function)
instrument(instrument_arg, String.t, String.t, function) :: any
Execute the given function in start / finish event calls. See instrument/6
.
instrument(arg, name, title, body, function)
instrument(instrument_arg, String.t, String.t, String.t, function) :: any
Execute the given function in start / finish event calls. See instrument/6
.
instrument(pid, name, title, body, body_format, function)
instrument(instrument_arg, String.t, String.t, String.t, integer, function) :: any
Execute the given function in start / finish event calls.
The result of the function’s execution is returned. For example, to instrument a backend HTTP call in a Phoenix controller, do the following:
import Appsignal.Instrumentation.Helpers, only: [instrument: 4]
def index(conn, _params) do
result = instrument conn, "net.http", "Some slow backend call", fn() ->
Backend.get_result()
end
json conn, result
end