Collector (collector v0.1.1)
Copy MarkdownReports your app's errors to Collector.
Add the dependency and the DSN, and crashes are reported on their own:
{:collector, ">= 0.1.0"}
# In the deployed app's environment
COLLECTOR_DSN=https://clt_…@app.clt.chrom.arSee Collector.Config for the other options. Without a DSN, nothing
is sent.
To report something yourself, use capture_exception/2 or
capture_message/2.
Summary
Functions
Reports an exception you rescued.
Reports something that isn't an exception.
Attaches the current user's id to errors reported from this process (the request, in a web app). An id, not personal data.
Functions
Reports an exception you rescued.
try do
charge!(order)
rescue
e ->
Collector.capture_exception(e, stacktrace: __STACKTRACE__)
{:error, :payment_failed}
endOptions: :stacktrace, :level, :fingerprint, :tags, :user.
Reports something that isn't an exception.
Collector.capture_message("Payment gateway slow", level: :warning)Options: :level (default :error), :fingerprint, :tags, :user.
Attaches the current user's id to errors reported from this process (the request, in a web app). An id, not personal data.
Collector.set_user(current_user.id)