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

# How to monitor game errors and crashes

> Send errors and crashes from a Godot game, open the Game health dashboard, and find the errors and builds that hurt players most.

ManaLens records errors and crashes as events. So you can see crash-free sessions next to your players, builds and campaigns. This guide sets up a Godot game and reads the **Game health** dashboard.

## Part 1: Send errors and crashes

**1. Install the Godot SDK**

Follow the [Godot SDK](https://docs.manalens.dev/sdks/godot.md) setup. Set `app_version` and `build` in `init()`, so you can compare builds. For Unity, follow the [Unity SDK](https://docs.manalens.dev/sdks/unity.md) setup and set `Build` (the version defaults to `Application.version`).

**2. Let the SDK capture engine errors**

On Godot 4.5 and later, the SDK sends engine and script errors as `error` events. This is on by default (`capture_engine_errors`).

**3. Report your own errors**

Call `track_error()` where your game catches a failure:

```gdscript theme={null}
UntitledAnalytics.track_error("Save failed for slot %d" % slot, {
    "error_type": "SaveFailed",
    "severity": "critical",
    "handled": false,
})
```

**4. Count crashes**

You do not need to do anything. At the next launch after a crash, the SDK sends `app_unclean_exit` in the session and build that crashed.

> [!NOTE]
>
> ManaLens does not store native crash dumps or symbols. Keep Sentry or Backtrace for those. Other engines can send the same `error` and `app_unclean_exit` events to the [events endpoint](https://docs.manalens.dev/sdks/app-events.md).

## Part 2: Open the Game health dashboard

1. Open **Dashboards**.
2. Under **Templates**, click **Game health**. The preview shows your data for the last 30 days.
3. Click **Create board**.

| Chart | Meaning |
| - | - |
| **Crash-free sessions** | 1 minus the share of sessions with `app_unclean_exit` or an unhandled `critical` error |
| **Crash-free players** | The same, with distinct players |
| **Errored sessions** | The share of sessions with an error of severity `error` or `critical`. Warnings do not count. |
| **Errors per session** | Errors divided by sessions, also **by build** |
| **Top errors** | One row for each error group (fingerprint), with count, players, first and last seen, and latest build |

## Part 3: Find what to fix

* **After a release:** filter the dashboard by **Build** (App group). Compare **Errors per session by build** with the build before.
* **By platform:** filter by **Platform** to find a crash on one operating system.
* **Effect on players:** add the filter **Event property** `severity` is `critical` to a [retention chart](https://docs.manalens.dev/guides/retention.md). It keeps only players with a critical error. Compare it with all players.
* **Before the error:** open a player from the **Users** page to see their events. Each `error` also has `breadcrumbs`: the last 20 event names.

> [!TIP]
>
> The charts are SQL charts. Click **Edit chart** to change a query, for example to exclude `warning` errors or to add a column.

## Part 4: Keep personal data out

Use `set_before_send()` to drop or clean an error before it leaves the game. Do not send email addresses or other personal data in `message`.

## Related

* [Errors and crashes](https://docs.manalens.dev/features/error-tracking.md): every property, grouping and limit.
* [Godot SDK](https://docs.manalens.dev/sdks/godot.md)
* [Unity SDK](https://docs.manalens.dev/sdks/unity.md)
* [Game events reference](https://docs.manalens.dev/data/events/game.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.