API Reference collector v#0.1.1

Copy Markdown

Modules

Reports your app's errors to Collector.

What a process did just before it crashed: its last 50 log lines (info and above), plus Ecto queries for the repos in config :collector, repos: [[:my_app, :repo]] (their telemetry prefixes).

Where events go and what they say about the app. Everything has a default, the DSN included: set COLLECTOR_DSN in the environment, or configure it yourself

Builds protocol v1 events (see Collector's docs/protocol.md): plain string-keyed maps, ready to encode as JSON.

An Erlang :logger handler that reports crashes and records breadcrumbs.

Reports Oban job failures. Attached on its own when Oban is loaded.

Attaches the current request to any error reported while handling it.

Sends events to Collector in the background, one at a time, so that a slow or unreachable Collector never slows the app down.

Source lines around a frame, so Collector can show the failing line.

Turns an Elixir stacktrace into protocol frames, innermost first (the order Elixir already uses), each marked in_app when it is the app's own code. Collector groups errors by those frames, so that mark is the most important thing this package gets right.

Mix Tasks

Stores your app's lib/**/*.ex inside the collector dependency's build, so a release, which ships no source files, can still send the lines around each frame of your code.