bugban 1.1.1 copy "bugban: ^1.1.1" to clipboard
bugban: ^1.1.1 copied to clipboard

Bugban error and performance monitoring for Dart. Framework-agnostic core — use bugban_flutter in a Flutter app.

bugban #

Error and performance monitoring for Dart — the framework-agnostic core of the Bugban SDK family.

In a Flutter app, use bugban_flutter instead. It depends on this package and wires it into Flutter's error paths, the navigator, and screenshots. This package is for pure Dart: a CLI, a server, or an app that wants to drive the client itself.

dart pub add bugban
import 'package:bugban/bugban.dart';

Future<void> main() async {
  await Bugban.init(BugbanOptions(
    apiKey: 'bb_your_project_key',
    host: 'https://bugban.online',
    environment: 'production',
    release: '1.0.0',
  ));

  try {
    await risky();
  } catch (e, s) {
    Bugban.capture(e, stackTrace: s);
  }

  await Bugban.flush(); // before the process exits
}

What it does #

  • Stack traces from all three Dart formats — VM/JIT, AOT and dart2js — with app frames distinguished from dart:, Flutter and SDK frames, so the panel can point at your line instead of framework internals. An unrecognised line is kept raw rather than dropped.
  • Redaction of anything that looks like a secret, anywhere in the payload, before it leaves the device.
  • An offline queue (EventStore) — events are written before the request goes out and cleared only once the server takes them.
  • Breadcrumbs — the steps before the error.
  • MetricsrecordMetric feeds the panel's performance tab.

Rules it follows #

  • Nothing throws into the host app. Every entry point is wrapped.
  • No API key means a silent no-op, not an exception.
  • A 4xx is treated as delivered, so a bad key cannot make the queue retry the same rejection on every launch forever.

Testing your integration #

Bugban.init takes a transport, so you can assert on what would have been sent without a network:

await Bugban.init(
  options,
  transport: Transport(
    host: options.host,
    apiKey: options.apiKey,
    timeout: const Duration(seconds: 2),
    client: myFakeHttpClient,
  ),
);

Licence #

MIT

0
likes
150
points
141
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Bugban error and performance monitoring for Dart. Framework-agnostic core — use bugban_flutter in a Flutter app.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

http

More

Packages that depend on bugban