All Projects → rollbar → Rollbar Android

rollbar / Rollbar Android

Rollbar for Android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Rollbar Android

Bugsnag Node
[DEPRECATED] Please upgrade to our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 48 (+17.07%)
Mutual labels:  error-handling, error-monitoring, exceptions, error-handler
Bugsnag Php
Bugsnag error monitoring and crash reporting tool for PHP apps
Stars: ✭ 475 (+1058.54%)
Mutual labels:  error-handling, error-monitoring, exceptions
Rollbar Php
Error tracking and logging from PHP to Rollbar
Stars: ✭ 297 (+624.39%)
Mutual labels:  error-handling, error-monitoring, exceptions
Bugsnag Go
Automatic panic monitoring for Go and Go web frameworks, like negroni, gin, and revel
Stars: ✭ 155 (+278.05%)
Mutual labels:  error-handling, error-monitoring, exceptions
Bugsnag React Native
Error monitoring and reporting tool for native exceptions and JS errors in React Native apps
Stars: ✭ 374 (+812.2%)
Mutual labels:  error-handling, error-monitoring, exceptions
Bugsnag Android Ndk
DEPRECATED - this project now lives at bugsnag/bugsnag-android
Stars: ✭ 42 (+2.44%)
Mutual labels:  error-handling, error-monitoring, exceptions
Ben.demystifier
High performance understanding for stack traces (Make error logs more productive)
Stars: ✭ 2,142 (+5124.39%)
Mutual labels:  error-handling, exceptions, stack-traces
Bugsnag Js
Javascript error handling tool for Bugsnag. Monitor and report JavaScript bugs & errors.
Stars: ✭ 625 (+1424.39%)
Mutual labels:  error-handling, error-monitoring, exceptions
Emperror
The Emperor takes care of all errors personally
Stars: ✭ 201 (+390.24%)
Mutual labels:  error-handling, error-monitoring, error-handler
Pyrollbar
Error tracking and logging from Python to Rollbar
Stars: ✭ 169 (+312.2%)
Mutual labels:  error-handling, error-monitoring, exceptions
Bugsnag Cocoa
Bugsnag crash reporting for iOS, macOS and tvOS apps
Stars: ✭ 167 (+307.32%)
Mutual labels:  error-handling, error-monitoring, exceptions
bugsnag-java
Bugsnag error reporting for Java.
Stars: ✭ 51 (+24.39%)
Mutual labels:  error-monitoring, error-handling, exceptions
Bugsnag Ruby
Bugsnag error monitoring & reporting software for rails, sinatra, rack and ruby
Stars: ✭ 211 (+414.63%)
Mutual labels:  error-handling, error-monitoring, exceptions
Bugsnag Laravel
Bugsnag notifier for the Laravel PHP framework. Monitor and report Laravel errors.
Stars: ✭ 746 (+1719.51%)
Mutual labels:  error-handling, error-monitoring, exceptions
Tslog
📝 tslog - Expressive TypeScript Logger for Node.js.
Stars: ✭ 321 (+682.93%)
Mutual labels:  error-handling, exceptions
Data Structures
Go datastructures.
Stars: ✭ 336 (+719.51%)
Mutual labels:  error-handling, exceptions
Rollbar Gem
Exception tracking and logging from Ruby to Rollbar
Stars: ✭ 414 (+909.76%)
Mutual labels:  error-monitoring, exceptions
Sentry Cocoa
The official Sentry SDK for iOS, tvOS, macOS, watchOS
Stars: ✭ 370 (+802.44%)
Mutual labels:  error-monitoring, error-handler
Log Process Errors
Show some ❤️ to Node.js process errors
Stars: ✭ 424 (+934.15%)
Mutual labels:  error-handling, error-handler
Rollbar.js
Error tracking and logging from JS to Rollbar
Stars: ✭ 479 (+1068.29%)
Mutual labels:  error-handling, error-monitoring

Rollbar for Android

Java library for reporting exceptions, errors, and log messages to Rollbar.

Deprecated

The library in this repo has been deprecated in favor of the universal library here.

Setup

Maven

Install from Maven central:

<dependencies>
  <dependency>
    <groupId>com.rollbar</groupId>
     <artifactId>rollbar-android</artifactId>
     <version>0.2.1</version>
  </dependency>
</dependencies>

or

compile 'com.rollbar:rollbar-android:0.2.1'

Jar

Download rollbar-android.jar and place it in your Android project's libs directory.

Add the following line in your custom Application subclass's onCreate() to initialize Rollbar:

Rollbar.init(this, "POST_CLIENT_ITEM_ACCESS_TOKEN", "production");

Make sure your AndroidManifest.xml contains the android.permission.INTERNET permission.

Usage

By default the notifier will report all uncaught exceptions to Rollbar.

To report caught exceptions, call reportException():

Rollbar.reportException(new Exception("Test exception")); // default level is "warning"

try {
    amount = Integer.parseInt(data);
} except (NumberFormatException e) {
    // Providing a description for this exception
    Rollbar.reportException(e, "critical", "Unexpected data from server");
}

To report your own messages, call reportMessage():

Rollbar.reportMessage("A test message", "debug"); // default level is "info"

Configuration reference

The following configuration methods are available:

  • Rollbar.setPersonData(String id, String username, String email)

    Sets the properties of the current user (called a "person" in Rollbar parlance) to be sent along with every report.

    Default: all null

  • Rollbar.setReportUncaughtExceptions(boolean report)

    Sets whether or not to report uncaught exceptions to Rollbar.

    Default: true

  • Rollbar.setIncludeLogcat(boolean includeLogcat)

    Sets whether or not to include logcat output in reports to Rollbar.

    Note: For devices with API level 15 and lower, you will need to include the android.permission.READ_LOGS permission in your app's AndroidManifest.xml for logcat collection to work.

    Default: false

  • Rollbar.setDefaultCaughtExceptionLevel(String level)

    Sets the level caught exceptions are reported as by default.

    Default: "warning"

  • Rollbar.setUncaughtExceptionLevel(String level)

    Sets the level uncaught exceptions are reported as.

    Default: "error"

  • Rollbar.setSendOnUncaughtException(boolean send)

    If true, uncaught exceptions will immediately be sent to Rollbar, blocking the process shutdown sequence. If false, the exception will just be saved to disk so that it can be sent next time the process starts.

    Default: false

  • Rollbar.setEndpoint(String endpoint)

    If you are using Rollbar Enterprise, call setEndpoint to route events to your Rollbar instance. (Most users will not need to do this.)

    Default: "https://api.rollbar.com/api/1/items/"

  • Rollbar.setItemScheduleDelay(int delay)

    Sets the delay between retries of sending failed items, in seconds.

    Default: 30

Deobfuscation

If you use ProGuard to obfuscate your code in production, reported stack traces will not be very useful in most cases.

Rollbar provides a way for you to upload the mapping.txt file generated in the obfuscation process so that stack traces can be deobfuscated as they are reported.

Here is an example cURL command to upload a mapping.txt file:

curl 'https://api.rollbar.com/api/1/proguard' \
  -F access_token=POST_SERVER_ITEM_ACCESS_TOKEN \
  -F version=0.0.10 \
  -F mapping=@path/to/mapping.txt

Where version matches the android:versionName in your app's AndroidManifest.xml, corresponding to the version the mapping.txt was generated for.

After uploading, any future reported exceptions for the specified version will automatically be deobfuscated using the mapping file.

By default, file names and line numbers are removed by ProGuard. To preserve this information to make debugging easier, add the following to your proguard-project.txt:

-keepattributes SourceFile,LineNumberTable

Help / Support

If you run into any issues, please email us at [email protected]

Build

  1. Define property sdk.dir which contains path to Android SDK inside local.properties
  2. Make sure you have installed the platform specified in project.properties
  • E.g. sdk.dir = /Users/coryvirok/Development/adt-bundle-mac-x86_64-20140702/sdk/
  1. Run ant from command line

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].