Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core(tsc): add type checking to sentry usage #5993

Merged
merged 4 commits into from
Sep 8, 2018
Merged

core(tsc): add type checking to sentry usage #5993

merged 4 commits into from
Sep 8, 2018

Conversation

brendankenny
Copy link
Member

long-standing TODO.

Also fixes #5971

{pattern: /No.*node with given id/, rate: 0.01},
{pattern: /Could not load stylesheet/, rate: 0.1},
{pattern: /No.*resource with given/, rate: 0.1},
{pattern: /No.*node with given id/, rate: 0.1},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could drop these completely? Also do they fire multiple times per run? We could fire once per audit instead (does sentry support adding a count payload and have a decent aggregation view of them?)

// Ignore expected errors
if (err.expected) return empty;
// Sample known errors that occur at a high frequency
const sampledErrorMatch = SAMPLED_ERRORS.find(sample => sample.pattern.test(err.message));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we keep this block?

along with something like this above:

const SAMPLED_ERRORS = [	
  // Error code based sampling	
  // e.g.: {pattern: /No.*node with given id/, rate: 0.01},	
];

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There you go :P

@paulirish
Copy link
Member

type stuff and fonts look good!

const sentryDelegate = Object.assign({}, sentryApi);
sentryDelegate.init = function init(opts) {
const sentryDelegate = {
init,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol the hoist. a lil fancy for my tastes, but ok.. :)

@brendankenny brendankenny merged commit 6656521 into master Sep 8, 2018
@brendankenny brendankenny deleted the sentry branch September 8, 2018 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sample our sentry errors more heavily
2 participants