# boop_error_tracker usage rules

boop_error_tracker pushes ErrorTracker errors to the developer's phone through Boop. It attaches to ErrorTracker's telemetry events; it does not replace, wrap, or configure ErrorTracker, and it has no database.

- Requires `error_tracker` installed and configured by the host app, and `boop_ex` configured with `url` and `api_key` (see boop_ex's usage rules). Add both deps; this package only listens.
- Configure in `config/runtime.exs`:

  ```elixir
  config :boop_error_tracker,
    environment: config_env(),
    source: "my_app",
    notify_on: [:new, :unresolved],
    throttle: :timer.minutes(10),
    enabled: config_env() == :prod
  ```

- Nothing else is needed: the telemetry handler attaches when the `:boop_error_tracker` application starts. Do not call `BoopErrorTracker.attach/0` from the host app's supervision tree or `Application.start/2`; use it only in tests or after `detach/0`.
- `notify_on` values: `:new` (first time an error is seen), `:unresolved` (an error marked resolved in the ErrorTracker UI happens again), `:occurrence` (every occurrence, throttled per error by `throttle` milliseconds). Default `[:new, :unresolved]`; add `:occurrence` only when the user wants ongoing noise.
- Muted errors (muted in the ErrorTracker UI) are never sent. Do not add your own filtering for that.
- Every event is level `:error`; set `level: :critical` for prominent pushes. `source` defaults to `"error_tracker"`; set it to the app name.
- `in_app: [:my_app, :my_app_web]` pins which OTP applications count as in-app frames in the stacktrace. Without it, common framework apps are treated as not in-app.
- `tags: %{team: "web"}` adds static tags to every event. Occurrence context is sent as `context`; boop_ex redacts sensitive keys inside it.
- Sends use `Boop.send_async/2`: nothing blocks the process that raised, and failures are logged, never raised. Do not wrap in `try/rescue`.
- Set `enabled: false` in `config/test.exs`.
