Developer DocsSDK Docs

SDK Overview

Both the React Native and Flutter SDKs work the same way under the hood. This page covers the shared concepts; see the React Native or Flutter page for install steps and API specifics.

Two kinds of capture

The SDK does two independent things, and it’s worth keeping them separate in your head:

Fatal crash capture is always on once you call init / initCrashReporting — native crashes (signals, uncaught exceptions) on iOS and Android, plus uncaught Dart/JS errors. This isn’t for routine logging; most apps already run something like Crashlytics for that.

On-demand debug recording only runs between an explicit start and stop, and it’s tied to one specific Logtryl ticket. This is the one testers trigger deliberately while reproducing a bug — see “Starting and stopping a recording” below.

Getting your project key

Every project in Logtryl has its own key, generated automatically when the project is created. It’s what you pass to initCrashReporting / LogtrylCrash.init to tie the SDK install to that project — fatal crash capture won’t work without it.

  1. In the Dashboard (or the Desktop app), open the project and go to its Edit page.
  2. Scroll down to the Project Key field and use the copy button next to it.
Don't see a Project Key field?
Save the project once from the Edit page, even with no other changes — projects created before this field existed generate their key the first time they’re saved.

What a recording captures

  • Console output — whatever the app logs while the recording is active.
  • Network requests — method, URL, headers, and bodies for both request and response. Common sensitive headers (Authorization, Cookie, X-Api-Key, ...) and body keys (password, token, secret, ...) are redacted automatically before anything is buffered.
  • Exceptions — anything the SDK catches automatically (a fatal error that happens mid-recording), plus anything you flag yourself with recordHandledError from your own try/catch.

Nothing is captured before a recording starts or after it stops — this is deliberately not always-on monitoring.

Pairing a device

Before a device can capture anything, it needs to be paired to a Logtryl project once. In the Logtryl app, open Settings → Pair a Device to get a short code, then enter that code on the device running your app (via the SDK’s built-in pairing drawer, or your own UI calling pairDevice(code)). Pairing persists across app restarts — it’s a one-time step per device, not per recording.

Starting and stopping a recording

A recording is controlled from the Logtryl app, not from your code — the SDK just watches for one to start:

  1. In the Logtryl app, open Create Ticket, pick the project, and tap SDK Debug Recording. Logtryl tries to auto-launch the paired target app for you.
  2. The button turns into a Recording… stop control. On the device, the SDK notices (it polls every ~5 seconds while paired) and starts capturing.
  3. Reproduce the bug in your app.
  4. Switch back to the Logtryl app and tap Recording… again to stop — there’s no timer or auto-stop for debug recordings. Tapping Create Ticket while still recording prompts you to stop and include it, or keep recording.
  5. Once the ticket is saved, the finished recording is linked to it automatically — everything captured shows up under that ticket’s errors/logs.

If the app crashes during a recording

The target app needs to be restarted
A crash that happens while a recording is active is captured on-device at the moment it happens, but it only syncs to Logtryl on the target app’s next launch — not live. If the app just crashed mid-recording, reopen it once before checking the ticket; the crash won’t appear until you do.

Next steps

See the React Native SDK or Flutter SDK page for install steps and API details.