Bellwether.Reporter (bellwether v0.1.0)

Copy Markdown

Owns dedupe state and hands Events to a sink.

Separate from the :logger handler because the handler runs in the process that is crashing. Its job there is to extract, shape and hand off, then get out of the way — anything slower risks turning a supervised crash into a worse one.

Summary

Functions

Report a crash. Never blocks the caller.

Emit counts for everything held back in the window that just closed.

Start a Reporter.

Functions

crash(reason, stacktrace, server \\ __MODULE__)

Report a crash. Never blocks the caller.

flush(server \\ __MODULE__)

Emit counts for everything held back in the window that just closed.

start_link(opts \\ [])

Start a Reporter.

Options:

  • :name - registered name, defaulting to this module.
  • :sink - {module, function, args} or a 1-arity function receiving each Event. Defaults to discarding, so the adapter is inert until the Agent socket is configured.
  • :block - fingerprint patterns never to report. See Bellwether.Filter.
  • :window_ms, :max_fingerprints - see Bellwether.Dedupe
  • :own_apps - see Bellwether.Fingerprint
  • :keep_messages_for - exception modules whose message may travel. See Bellwether.Crash. Empty by default, because only the application knows.
  • :backtrace_depth - raises the VM's stacktrace limit. See below.