KasyKasy

Crash Reports (Sentry)

Error and crash capture in production. Sentry shows which line broke and which user it happened to.

Sentry captures your app's errors and crashes in production and alerts you in its dashboard. Without it, you only find out something broke when a user complains (or uninstalls).

Production only. In debug, errors show up in the console as usual. Sentry only sends to the cloud in release builds, so you don't flood the dashboard with everyday bugs.

Implementation

Via MCP: ask your assistant "add sentry to my project". It runs add_feature for you. See Kasy MCP.

  1. Run:

    kasy add sentry

    The CLI asks for your Sentry DSN and saves it in the project.

  2. To get the DSN:

    1. Create an account at sentry.io (free tier to start)
    2. Create Project → choose Flutter
    3. Under Settings → Client Keys (DSN), copy the string https://<key>@oXXXX.ingest.sentry.io/XXXX
    4. Paste it into kasy add sentry when asked
  3. To configure it later, without going through the CLI:

    # .env
    SENTRY_DSN=https://your_key@oXXXX.ingest.sentry.io/XXXXXX

    Via MCP: paste the DSN in chat and ask "set up Sentry" — the assistant writes it with configure_project_keys. See Kasy MCP.

Information

What Sentry captures on its own

TypeCaptured?
App crash (uncaught exception)Yes
Error in a Future without try/catchYes
Flutter framework error (build)Yes
HTTP 500 from your backendYes
print() messageNo, use Sentry on purpose

Sending a manual error

import 'package:sentry_flutter/sentry_flutter.dart';

try {
  await something();
} catch (error, stack) {
  await Sentry.captureException(error, stackTrace: stack);
}

Where to see the errors

sentry.io/issues → shows every bug with:

  • The exact line of code where it broke
  • How many users were affected
  • App version, device, OS
  • Breadcrumb (last actions before the error)

You can also get notifications by email or Slack when a new bug shows up.

Best practices

  • Don't send personal data: Sentry sees the stack trace, not your records. But if you log an email or a sensitive ID inside the error, it gets saved there too. Avoid it.
  • Don't capture expected errors: form validation, wrong login, etc. already have on-screen feedback. Sentry is for what shouldn't happen.
  • Keep the free quota healthy: the free plan has ~5k errors/month. Go over that and the account starts dropping events, so don't send everything.

Last updated on 08/02/2026