Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Mixbook/rollbar.dart

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollbar.dart

A Dart plugin for Rollbar.com

Quick Start

Import rollbar.dart.

import "package:rollbar/rollbar.dart" as rollbar;

Then wrap your main entrypoint into rollbar.install:

void main() {
  rollbar.install("your_access_token", () {
    var app = new App();
    app.run();
  });
}

That's it!

Advanced features

If you want, you can send any additional data to Rollbar, or overwrite the defaults the package sends. Just pass it as an additional argument to rollbar.install. E.g. you may want to pass the current user info:

var app;
rollbar.install("your_access_token", () {
  app = new App();
  app.run();
}, customPayload: () {
  return {"data": {"person": {"id": app.user.id, "email": app.user.email}}};
});

This will be merged into the default payload. You can send any additional data you want, just check the API docs to know your options: https://rollbar.com/docs/api_items/ (section "Data Format")

You also can provide your logger, then the plugin will write some debug info to it in 'finer' level

rollbar.install("your_access_token", () {
  var app = new App();
  app.run();
}, logger: Logger.root);

By default, source maps support is enabled, but you need to specify a version of uploaded source maps. You can do that this way:

var app;
rollbar.install("your_access_token", () {
  app = new App();
  app.run();
}, sourceMapsCodeVersion: () => app.version);

Or you can disable source maps at all:

var app;
rollbar.install("your_access_token", () {
  app = new App();
  app.run();
}, areSourceMapsEnabled: false);

About

Dart plugin for Rollbar.com

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.