Skip to content

Instantly share code, notes, and snippets.

View brianr's full-sized avatar

Brian Rue brianr

View GitHub Profile
@brianr
brianr / example.json
Last active March 14, 2018 16:14
Rollbar grouping config to include the exception message for node.js errors with class name 'Error'
[{
"condition": {"all": [
{"path": "body.trace.exception.class", "eq": "Error"},
{"path": "framework", "eq": "node-js"}
]},
"title": "{{default_title}}",
"fingerprint": "{{default_fingerprint}}-{{body.trace.exception.message}}"
}]
@brianr
brianr / gist:58899467f58b80eee1eb
Created July 1, 2015 17:59
rollbar.js checkIgnore to ignore all "Script error" uncaught errors
_rollbarConfig = {
accessToken: 'your token',
captureUncaught: true,
payload: {
environment: 'production',
},
checkIgnore: function(isUncaught, args, payload) {
if (isUncaught && args[0] && args[0].indexOf('Script error') === 0) {
// ignore
return true;
@brianr
brianr / gist:467bccd47b10015ad77d
Created June 18, 2015 20:40
Rollbar custom grouping to group file:// into a single item
[
{
"condition": {
"path": "body.trace.frames.*.filename",
"contains": "file://"
},
"title": "Error on file://",
"fingerprint": "error-on-local-filesystem"
}
]
select *
from item_occurrence
where timestamp > unix_timestamp() - 86400
and request.params.some_key LIKE '%some_value%'
select body.trace.exception.message, count(*)
from item_occurrence
where item.counter = 123456
group by 1
order by 2 desc
@brianr
brianr / gist:e2c5ea89a51e167ce655
Created May 8, 2015 18:28
rollbar.js config example - force https
var _rollbarConfig = {
// force rollbar.js to load over HTTPS
rollbarJsUrl: 'https://d37gvrvc0wt4s1.cloudfront.net/js/v1.2/rollbar.min.js',
// force requests to api.rollbar.com to be made over HTTPS
endpoint: 'https://api.rollbar.com/api/1/',
// rest of your configuration here...
accessToken: "12c99de67a444c229fca100e0967486f",
captureUncaught: true,
payload: {
@brianr
brianr / gist:d7e61965fca488636da8
Last active August 29, 2015 14:18
RQL queries for deploys
-- select all deploys
select * from deploy;
-- select main columns for all deploys of a specific revision
select id, timestamp, environment, comment from deploy
where revision = 'some git sha here'
-- deploys of 'production' by revision, and when they were first and last deployed
select code_version, min(timestamp)
from item_occurrence
group by 1
@brianr
brianr / test.html
Last active August 29, 2015 14:15
Rollbar test file
<html>
<head>
<script>
var _rollbarConfig = {
// token for https://rollbar.com/rollbar/rollbar.js/ , a public project
accessToken: "12c99de67a444c229fca100e0967486f",
captureUncaught: true,
payload: {
environment: "test"
}
@brianr
brianr / gist:4f2d840772f76285aea3
Created February 13, 2015 20:31
Rollbar custom grouping to group RetrofitErrors by exception message
[{
"condition": {"all": [
{"path": "notifier.name", "eq": "rollbar-android"},
{"path": "body.trace_chain.0.exception.class", "eq": "retrofit.RetrofitError"}
]},
"fingerprint": "{{default_fingerprint}}-{{body.trace_chain.0.exception.message}",
"title": "{{default_title}}"
}]