AppSignal v1.12.0-beta.1 Appsignal.Instrumentation.Helpers View Source
Helper functions and macros to instrument function calls.
Link to this section Summary
Functions
Execute the given function in start / finish event calls in the current
transaction. See instrument/6
.
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.
Link to this section Types
instrument_arg()
View Sourceinstrument_arg() :: Appsignal.Transaction.t() | Plug.Conn.t() | pid() | nil
Link to this section Functions
Execute the given function in start / finish event calls in the current
transaction. See instrument/6
.
instrument(arg, name, title, function)
View Sourceinstrument(instrument_arg(), String.t(), String.t(), function()) :: any()
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.
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 "net.http", "Some slow backend call", fn() ->
Backend.get_result()
end
json conn, result
end