AppSignal v1.10.6 Appsignal View Source
AppSignal for Elixir. Follow the installation guide to install AppSignal into your Elixir app.
This module contains the main AppSignal OTP application, as well as a few helper functions for sending metrics to AppSignal.
These metrics do not rely on an active transaction being present. For transaction related-functions, see the Appsignal.Transaction module.
Link to this section Summary
Functions
Add a value to a distribution
Callback invoked after code upgrade, if the application environment has changed
Increment a counter of some metric
Send an error to AppSignal
Set a gauge for a measurement of some metric
Application callback function
Application callback function
Link to this section Functions
add_distribution_value(key, value, tags \\ %{}) View Source
Add a value to a distribution
Use this to collect multiple data points that will be merged into a graph.
config_change(changed, new, removed) View Source
Callback invoked after code upgrade, if the application environment has changed.
changed
is a keyword list of keys and their changed values in the
application environment. new
is a keyword list with all new keys
and their values. removed
is a list with all removed keys.
Callback implementation for Application.config_change/3
.
increment_counter(key, count \\ 1, tags \\ %{}) View Source
Increment a counter of some metric.
phoenix?() View Source
plug?() View Source
send_error(error, prefix \\ "", stack \\ nil, metadata \\ %{}, conn \\ nil, fun \\ fn t -> t end, namespace \\ :http_request) View Source
Send an error to AppSignal
When there is no current transaction, this call starts one.
Examples
Appsignal.send_error(%RuntimeError{})
Appsignal.send_error(%RuntimeError{}, "Oops!")
Appsignal.send_error(%RuntimeError{}, "", System.stacktrace())
Appsignal.send_error(%RuntimeError{}, "", [], %{foo: "bar"})
Appsignal.send_error(%RuntimeError{}, "", [], %{}, %Plug.Conn{})
Appsignal.send_error(%RuntimeError{}, "", [], %{}, nil, fn(transaction) ->
Appsignal.Transaction.set_sample_data(transaction, "key", %{foo: "bar"})
end)
set_gauge(key, value, tags \\ %{}) View Source
Set a gauge for a measurement of some metric.
start(type, args) View Source
Application callback function
stop(state) View Source
Application callback function