> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idun-group.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Telemetry events

> Canonical list of browser-side PostHog events emitted by the Idun standalone UI.

The Idun standalone UI emits the events below through PostHog. The single off-switch is `IDUN_TELEMETRY_ENABLED=false`, which also kills Python engine telemetry.

## Stability policy

Event names are a public contract. Renaming or removing an event goes through one release with both the old and new names emitted, so downstream PostHog dashboards and queries have time to migrate. The release notes call out the deprecation; the old name is removed in the following release.

If you need to ship a breaking change faster than that, raise it explicitly in the PR description.

## Events

| Event                                       | Where it fires                            | Properties                                             |
| ------------------------------------------- | ----------------------------------------- | ------------------------------------------------------ |
| `$pageview` / `$autocapture` / `$pageleave` | Built-in PostHog autocapture              | n/a                                                    |
| `auth.login.start`                          | Login form submit or OIDC redirect button | `method`, `provider?`                                  |
| `auth.login.success`                        | OAuth callback or basic-auth response     | `method`, `provider?`, `duration_ms`                   |
| `auth.login.failure`                        | OAuth callback or basic-auth response     | `method`, `provider?`, `duration_ms`, `error_class`    |
| `auth.logout`                               | Topbar logout button                      | `method`                                               |
| `agent.config.saved`                        | Admin Save handlers                       | `agent_id`, `section`, `duration_ms`, `result`         |
| `agent.config.reloaded`                     | Admin Reload button                       | `agent_id`, `duration_ms`, `result`                    |
| `agent.run.started`                         | Chat send                                 | `agent_id`, `session_id`, `message_index`              |
| `agent.run.completed`                       | Stream RUN\_FINISHED                      | `agent_id`, `session_id`, `duration_ms`                |
| `agent.run.error`                           | Stream error                              | `agent_id`, `session_id`, `error_class`, `duration_ms` |
| `chat.message.sent`                         | `ChatInput` submit                        | `session_id`, `length_chars`, `length_words`           |
| `chat.response.received`                    | First TEXT\_MESSAGE\_CONTENT delta        | `session_id`, `time_to_first_token_ms`                 |
| `chat.error`                                | Error toast                               | `session_id`, `error_class`, `recoverable`             |

## Properties policy

* Message content is **never** sent. Only counts, durations, and error class names.
* Sensitive keys (`api_key`, `token`, `password`, `secret`, `bearer`, …) are redacted before send.
* String values are truncated at 200 characters.
* `error_class` is the exception constructor name, never the message.

## Super-properties

Attached to every event:

* `deployment_type` — `cloud` / `self-hosted` / `dev`
* `idun_version`
* `surface` — `admin` / `chat`

## Session replay

`posthog-js` records DOM + interactions. Masking is enforced via:

* `maskAllInputs: true` (every `<input>`/`<textarea>` masked)
* `data-ph-mask` on chat textarea + auth forms (defensive text mask)
* `data-ph-no-capture` on chat bubbles + prompts editor (full DOM block)

Disable session replay independently with `IDUN_TELEMETRY_SESSION_REPLAY=false`.

## Next steps

<Card title="Local trace store" icon="database" horizontal href="/observability/traces">
  See how agent runs are captured and surfaced in the bundled admin UI.
</Card>

<Card title="Observability overview" icon="chart-line" horizontal href="/observability/overview">
  Wire an external provider on top of the local store.
</Card>

<Card title="Production hardening" icon="shield-halved" horizontal href="/deployment/hardening">
  Lock down the standalone before shipping to production.
</Card>
