# tlm v0.1.0 - API Reference

## Modules

- [Tlm](Tlm.md): Reports your app's errors to Tlm.
- [Tlm.Breadcrumbs](Tlm.Breadcrumbs.md): What a process did just before it crashed: its last 50 log lines (info
and above), plus Ecto queries for the repos in `config :tlm,
repos: [[:my_app, :repo]]` (their telemetry prefixes).
- [Tlm.Config](Tlm.Config.md): Where events go and what they say about the app. Everything has a
default, the DSN included: set `TLM_DSN` in the environment, or
configure it yourself
- [Tlm.Event](Tlm.Event.md): Builds protocol v1 events (see Tlm's `docs/protocol.md`): plain
string-keyed maps, ready to encode as JSON.

- [Tlm.Heartbeat](Tlm.Heartbeat.md): Tells Tlm the app is up: one heartbeat when the app starts, then
one an hour, so a healthy app with no errors still shows as set up,
along with its release, environment and SDK version.
- [Tlm.LoggerHandler](Tlm.LoggerHandler.md): An Erlang `:logger` handler that reports crashes and records
breadcrumbs.
- [Tlm.Oban](Tlm.Oban.md): Reports Oban job failures. Attached on its own when Oban is loaded.
- [Tlm.Plug](Tlm.Plug.md): Attaches the current request to any error reported while handling it.
- [Tlm.Sender](Tlm.Sender.md): Sends events to Tlm in the background, one at a time, so that a
slow or unreachable Tlm never slows the app down.
- [Tlm.Source](Tlm.Source.md): Source lines around a frame, so Tlm can show the failing line.
- [Tlm.Stacktrace](Tlm.Stacktrace.md): 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. Tlm groups errors by those frames, so that mark is the
most important thing this package gets right.

- Exceptions
  - [Tlm.TestError](Tlm.TestError.md): What `Tlm.test_event/0` and `mix tlm.test` report: not a
real error, just a check that events arrive.

## Mix Tasks

- [mix tlm.package_source](Mix.Tasks.Tlm.PackageSource.md): Stores your app's `lib/**/*.ex` inside the tlm dependency's
build, so a release, which ships no source files, can still send the
lines around each frame of your code. It also records which file and
line defines each module, which releases strip from the compiled code.
- [mix tlm.test](Mix.Tasks.Tlm.Test.md): Sends one test event to Tlm, right away, and prints what it
answered, to check the setup end to end

