stackwarden 1.0.0
stackwarden: ^1.0.0 copied to clipboard
Official Flutter SDK for Stackwarden — self-hostable error monitoring with full feature parity.
Stackwarden for Flutter #
Official Flutter SDK for Stackwarden — self-hostable error monitoring and Explore signals (traces, logs, metrics).
Requires Dart 3.3+ and Flutter 3.16+.
Features:
- Error tracking (Flutter / zone / platform; optional native crash + ANR hooks)
- Performance: app start, navigation (
ui.load), HTTP child spans, optional profiling - Device / OS / app contexts and tags (via
device_info_plus+battery_plus) - Explore logs & metrics (opt-in)
- Breadcrumbs (HTTP, navigation, user interaction — via integrations)
- Offline queue with retry
- Attachments, user feedback, release-health helpers, source context
- Optional debug-symbol upload tool (
packages/stackwarden_dart_plugin)
Install #
dependencies:
stackwarden: ^1.0.0
flutter pub add stackwarden
Wire unhandled Flutter errors in main():
import 'package:stackwarden/stackwarden.dart';
Future<void> main() async {
await Integration.runApp(
() async {
// Do plugin / binding init here — not before Integration.runApp.
return const MyApp();
},
options: Options.fromMap({
'dsn': const String.fromEnvironment(
'STACKWARDEN_DSN',
defaultValue: 'http://sw_YOUR_PROJECT_KEY@127.0.0.1:8001',
),
'environment': 'development',
// Prefer id@version+build — see doc/device-context.md
// 'release': 'com.example.app@1.0.0+1',
'traces_sample_rate': 1.0,
'enable_logs': true,
'enable_metrics': true,
}),
);
}
Use Integration.navigatorObservers() on MaterialApp, and Integration.wrapHttpClient for HTTP spans under the active screen transaction.
Docs #
| Doc | What |
|---|---|
| installation.md | Error wiring, Docker DSN, verify |
| configuration.md | Options, Explore signals, transport |
| usage.md | Manual capture, scope, traces, logs, HTTP |
| device-context.md | Device / battery / packages / release |
See CONTRIBUTING.md for development.
License #
MIT — see LICENSE.