Connect an SDK
CrashCart speaks the Sentry envelope protocol, so setup is the Sentry SDK's own setup with a CrashCart DSN. Nothing CrashCart-specific is needed in the client.
The snippets below show the minimum. Two options are worth setting on every platform:
release— CrashCart groups release health and symbol files by release. Most SDKs read it from the app bundle automatically; set it explicitly when they don't.environment—production,staging, … Shown as a filter in the viewer.
Replace DSN with the project's DSN (http://<key>@crashcart.example.com/<id>).
Mobile
import Sentry
SentrySDK.start { options in
options.dsn = "DSN"
options.environment = "production"
// release defaults to bundle id @ version + build
}// AndroidManifest.xml
<application>
<meta-data android:name="io.sentry.dsn" android:value="DSN" />
<meta-data android:name="io.sentry.environment" android:value="production" />
</application>await SentryFlutter.init(
(options) {
options.dsn = 'DSN';
options.environment = 'production';
},
appRunner: () => runApp(const MyApp()),
);import * as Sentry from '@sentry/react-native';
Sentry.init({ dsn: 'DSN', environment: 'production' });For Android, the Sentry Android Gradle plugin uploads ProGuard / R8 mappings automatically — see Symbolication for the sentry.properties it needs.
Web
import * as Sentry from '@sentry/browser';
Sentry.init({
dsn: 'DSN',
release: 'shop-web@2.4.1', // must match the source map upload
environment: 'production',
});CrashCart answers CORS preflight for ingest; set CORS_ORIGIN to your site's origin instead of the default * in production.
Backend
import * as Sentry from '@sentry/node'; // or @sentry/bun
Sentry.init({ dsn: 'DSN', release: process.env.GIT_SHA });import sentry_sdk
sentry_sdk.init(dsn="DSN", release="api@2.4.1", environment="production")import "github.com/getsentry/sentry-go"
sentry.Init(sentry.ClientOptions{Dsn: "DSN", Release: "api@2.4.1"})
defer sentry.Flush(2 * time.Second)let _guard = sentry::init(("DSN", sentry::ClientOptions {
release: sentry::release_name!(),
..Default::default()
}));Sentry.init(options -> {
options.setDsn("DSN");
options.setRelease("api@2.4.1");
});SentrySdk.Init(o => {
o.Dsn = "DSN";
o.Release = "api@2.4.1";
});What the SDK sends that CrashCart uses
| Field | SDK source | Shown as |
|---|---|---|
level | event.level | fatal / error / warning / info / debug |
message | logentry.formatted or exception value | Issue title |
release | event.release / contexts.app.app_version | Release, release health |
environment | event.environment | Filter |
error_type | exception.values[0].type | Issue title |
error_location | computed: deepest in-app frame | CartFragment.java:142 |
device_model, os_version | contexts.device, contexts.os | Breakdown |
user.id | user.id | Filter, affected users |
handled | exception.mechanism.handled | false = crash |
| breadcrumbs, tags, extra | as sent | Event detail |
Sessions (session / sessions items) feed release health. Transactions, profiles, replays and client reports are accepted and discarded.
Set PII_REDACT=true to scrub emails, phone numbers, tokens and user ids before events are stored.
Verifying the connection
- Send a test message:
Sentry.captureMessage("hello crashcart")(every SDK has an equivalent). - Open the project in the viewer. A message event shows up under Events; exceptions also appear under Issues.
- If nothing arrives, check the SDK's debug output for the HTTP status from
/api/<id>/envelope/:401is a wrong key,404a wrong project id,429the rate limit.
The compatibility matrix lists the SDK versions exercised end to end with real clients.