Skip to content

Commit d9a28e3

Browse files
authoredJun 3, 2020
Adding more clarity into the native-agent README (#212)
* Adding more clarity into the native-agent README
1 parent 6cfff22 commit d9a28e3

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed
 

‎native-agent/README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,26 @@ Gradle the easiest way is to add the following to your `build.gradle` file:
2323
applicationDefaultJvmArgs = ["-agentpath:path/to/"+System.mapLibraryName("rollbar_java_agent")]
2424
```
2525

26-
Regardless of your JVM language of choice, at some level their is an invocation of the JVM and
26+
Once you have your Java code using the Native Agent, you need make sure your `rollbar-java` is
27+
configured with appPackages at a minimum. If you also want to handle uncaught exceptions,
28+
make sure the handleUncaughtErrors is set to true.
29+
30+
```
31+
// [appPackages]: Add a list of packages considered to be in your app. This is used
32+
// to filter out exceptions that don't match the package name in the stacktrace.
33+
34+
// [handleUncaughtErrors]: Set to true for unhandled exceptions
35+
36+
new Rollbar(withAccessToken("ACCESS-TOKEN")
37+
.appPackages(Arrays.asList("com.example.app"))
38+
.handleUncaughtErrors(true)
39+
.build());
40+
```
41+
42+
Once you have the agent setup and `rollbar-java` configured, `rollbar-java` will attribute the exceptions
43+
using the agent as well as send back unhandled exceptions if configured.
44+
45+
Regardless of your JVM language of choice, at some level there will be an invocation of the JVM and
2746
therefore there is a configuration option to pass arguments directly to the JVM.
2847

2948
## Getting the agent library

0 commit comments

Comments
 (0)
Please sign in to comment.