Path Filter
The Notifications Path filter allows data in the JSON payload to be used to decide when a notification should be sent
Raw JSON
The Rollbar SDK in the running application sends a JSON payload containing the event occurrence data. This raw JSON data can be viewed by selecting an occurrence on the Occurrences tab of the Item view. The Raw JSON is displayed at the end of the Occurrence view.
The JSON below is an example of a Raw JSON payload
{
"body": {
"trace": {
"frames": [
{
"class_name": "java.lang.Thread",
"method": "run",
"lineno": 748,
"filename": "Thread.java"
},
{
"class_name": "org.apache.tomcat.util.threads.TaskThread$WrappingRunnable",
"method": "run",
"lineno": 61,
"filename": "TaskThread.java"
},
{
"class_name": "com.example.springboot.MainController",
"method": "test",
"lineno": 32,
"filename": "MainController.java"
}
],
"exception": {
"message": "Unhandled Thread error has occurred",
"class": "java.lang.RuntimeException"
}
}
},
"person": {
"id": "10098"
},
"custom": {
"trace_id": "9e5ba3146",
"customer_type": "enterprise"
}
}
Example Filters
Note: All Path filters need to be prefixed with the tag body
Example 1: Exception message contents
body.body.trace.exception.message
Example 2: Custom data field contents
body.custom.customer_type
Example 3 First frame of the stack trace
frames.0 means 1st frame of the stack trace
body.body.trace.frames.0.class_name
Example 4: Last frame of the stack trace
frames.-1 means last frame of the stack trace
body.body.trace.frames.-1.method
Example 5: Numeric value
body.person.id >= 1000
Updated 12 months ago