Skip to content

Instantly share code, notes, and snippets.

View brianr's full-sized avatar

Brian Rue brianr

View GitHub Profile
@brianr
brianr / gist:82ff15b17c839ff14748
Created October 27, 2014 18:14
Rollbar RQL: Search for occurrences in last 24 hours by url pattern
select *
from item_occurrence
where timestamp >= unix_timestamp() - 24 * 60 * 60
and request.url like '%mydomain.com%'
@brianr
brianr / example.js
Last active January 14, 2023 01:20
rollbar.js - Ignore error types using checkIgnore
// List of error class names to ignore
var ROLLBAR_IGNORED_CLASS_NAMES = ['ReferenceError'];
var _rollbarConfig = {
accessToken: '<your access token>',
captureUncaught: true,
captureUnhandledRejections: true,
payload: {
environment: '<your env name>'
},
@brianr
brianr / wtf.md
Created December 4, 2012 19:59
WTF of the day: MySQL integer<->string comparison gotcha

To implement Ratchet.io's Person Tracking feature, we have a MySQL table like this:

create table person (
  id int unsigned not null,
  project_id int unsigned not null
  environment varchar(255) not null,
  person_id varchar(40) not null,
  username varchar(255),
  email varchar(255),
@brianr
brianr / example.json
Created September 14, 2017 02:42
rollbar custom fingerprinting config to group all javascript errors by message
[
{
"condition": {"all": [
{"path": "body", "contains": "message"},
{"path": "language", "eq": "javascript"}
]},
"fingerprint": "{{body.message.body}}"
},
{
"condition": {"all": [
# ensure you have rollbar in your Gemfile, e.g.: gem 'rollbar'
require 'rollbar'
Rollbar.configure do |config|
# configure with your project access token (a post_server_item token from the rollbar setup UI)
config.access_token = 'your_token_here'
# To only log internal ERROR-level internal messages from rollbar-gem
config.logger_level = 'error' # default is 'info', meaning INFO and above
@brianr
brianr / privacy-2019-03-29.diff
Created March 15, 2019 22:46
diff of Rollbar Privacy Policy changes for 3/29/19
1c1
< _Effective: May 25, 2018_
---
> _Effective: March 29, 2019_
82c82
< In the case of entities based in other countries outside the EEA, entering into European Commission approved standard contractual arrangements with them. Rollbar complies with the EU-U.S. and Swiss–U.S. Privacy Shield Frameworks as set forth by the U.S. Department of Commerce regarding the collection, use, and retention of personal information transferred from the European Union, the European Economic Area, and Switzerland to the United States. You can find Rollbar’s Privacy Shield certification [here](https://www.privacyshield.gov/participant?id=a2zt0000000TNcNAAW&status=Active). You can also learn more about Privacy Shield at [https://www.privacyshield.gov](https://www.privacyshield.gov).
---
> * In the case of entities based in other countries outside the EEA, entering into European Commission approved standard contractual arrangements with them. Rollbar complies with the EU-U.S. and Swiss–U.S. Privacy Shield Frameworks as set forth
@brianr
brianr / privacy-2018-05-25.diff
Created May 30, 2018 02:21
diff of Rollbar Privacy Policy changes for 5/25/18
1c1
< _Effective: October 17, 2016_
---
> _Effective: May 25, 2018_
3c3
< This Privacy Policy describes how and when Rollbar collects, uses and shares your information when you use our Services. Rollbar receives your information through our various websites, APIs, email notifications, integrations, and applications (the **"Services"** or **"Rollbar"**) and from our partners and other third parties. When using any of our Services you consent to the collection, transfer, manipulation, storage, disclosure and other uses of your information as described in this Privacy Policy. Irrespective of which country you reside in or supply information from, you authorize Rollbar to use your information in the United States and any other country where Rollbar operates.
---
> This Privacy Policy describes how and when Rollbar collects, uses and shares your information when you use our Services. Rollbar receives your information through our various websites, APIs, email notifications, integrations, and applications (the **"Se
@brianr
brianr / tos-2018-05-25.diff
Created May 30, 2018 02:16
diff of Rollbar Terms of Service changes for 5/25/18
1c1
< _Effective: March 6, 2017_
---
> _Effective: May 25, 2018_
3c3
< These Terms of Service (**"Terms"**) govern your access to and use of the services, including our various websites, APIs, email notifications, and applications (the **"Services"** or **"Rollbar"**), and any information, text, graphics, photos or other materials uploaded, downloaded or appearing on the Services (collectively referred to as "Content"). Your access to and use of the Services are conditioned on your acceptance of and compliance with these Terms. By accessing or using the Services you agree to be bound by these Terms.
---
> Welcome to Rollbar.com, the website and online service of Rollbar, Inc. (“Rollbar,” “we,” or “us”). This page explains the terms by which you may use our online and/or mobile services, web sites, APIs, SDKs, email notifications, and Software (as defined in 1(c) below) provided on or in connection with the service (collectively, the “Services”). Your access to and use of the Services are conditioned on your a
@brianr
brianr / README.md
Last active May 17, 2018 00:07
Rollbar IP addresses
@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}}"
}]