Skip to content

Commit

Permalink
Adding more clarity into the native-agent README (#212)
Browse files Browse the repository at this point in the history
* Adding more clarity into the native-agent README
  • Loading branch information
vselvarajijay authored Jun 3, 2020
1 parent 6cfff22 commit d9a28e3
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion native-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,26 @@ Gradle the easiest way is to add the following to your `build.gradle` file:
applicationDefaultJvmArgs = ["-agentpath:path/to/"+System.mapLibraryName("rollbar_java_agent")]
```

Regardless of your JVM language of choice, at some level their is an invocation of the JVM and
Once you have your Java code using the Native Agent, you need make sure your `rollbar-java` is
configured with appPackages at a minimum. If you also want to handle uncaught exceptions,
make sure the handleUncaughtErrors is set to true.

```
// [appPackages]: Add a list of packages considered to be in your app. This is used
// to filter out exceptions that don't match the package name in the stacktrace.
// [handleUncaughtErrors]: Set to true for unhandled exceptions
new Rollbar(withAccessToken("ACCESS-TOKEN")
.appPackages(Arrays.asList("com.example.app"))
.handleUncaughtErrors(true)
.build());
```

Once you have the agent setup and `rollbar-java` configured, `rollbar-java` will attribute the exceptions
using the agent as well as send back unhandled exceptions if configured.

Regardless of your JVM language of choice, at some level there will be an invocation of the JVM and
therefore there is a configuration option to pass arguments directly to the JVM.

## Getting the agent library
Expand Down

0 comments on commit d9a28e3

Please sign in to comment.