sentry
10.6.0, released today by sentry.io
Crash reporting and error tracking library for Dart and Flutter applications.
What it does
A crash reporting and error-tracking library that sends exceptions, stack traces, and performance monitoring metrics to Sentry.io. It supports Dart VM and Web, offering features like HTTP request breadcrumbs and error capture.
AI-written summary of version 10.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to capture and report runtime crashes or exceptions to a centralized dashboard.
- You want to track HTTP request performance and catch failed network requests as errors.
Skip it when
- You are using Flutter and should instead use the dedicated `sentry_flutter` package for full native crash support.
- You do not use Sentry.io as your error tracking backend.
Strengths
- Comprehensive error capture including unhandled exceptions and HTTP requests.
- Supports both Dart VM and Web platforms.
- Easy integration with `Sentry.init` or custom error zones.
Weaknesses
- For Flutter applications, this base package lacks some native features provided by `sentry_flutter`.
- Requires an external Sentry.io account and DSN setup.
Setup
- Kind
- FFI (native library)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 6
Sign up for a Sentry.io account to obtain a DSN, add the dependency, and initialize the SDK in your main function.
import 'package:sentry/sentry.dart';
Future<void> main() async {
await Sentry.init(
(options) {
options.dsn = 'https://example@sentry.io/example';
},
appRunner: initApp,
);
}
void initApp() {
// your app code
}Alternatives
Packages that do the same job and could replace sentry.
- bugsnag_flutter
Bugsnag crash monitoring and reporting tool for Flutter apps.
81Compare - raygun4flutter
Official Raygun crash reporting provider for Flutter applications.
77Compare - flutter_bugfender
Bugfender reporting and logging plugin for Flutter apps.
65Compare
Works with
Packages commonly used together with sentry: ones it builds on, ones built on it, and its own family.
- uuidsentry depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- stack_tracesentry depends on itProvides parsing, inspection, and readable formatting of Dart stack traces.
- websentry depends on itLightweight bindings for browser APIs via JS interop
- ffisentry depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- sentry_dart_pluginSame familyUploads debug symbols and source maps to Sentry for server-side symbolication.
- sentry_flutterBuilt on sentrySentry SDK for Flutter to capture errors, crashes and performance data across platforms.
- sentry_dioBuilt on sentryAdds Sentry performance tracing and error capture to Dio HTTP requests.
- sentry_loggingBuilt on sentryAdds Sentry logging integration for the Dart logging package