-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref: Added breadcrumbCallback and sentry breadcrumb TS typings #1133
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 ⌨️
@@ -24,7 +24,11 @@ var options: Raven.RavenOptions = { | |||
xhr: false, | |||
console: false, | |||
dom: true, | |||
location: false | |||
location: false, | |||
sentry: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sentry
is sentry event breadcrumbs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it has been added here #1099
@@ -60,7 +64,7 @@ var err:Error = Raven.lastException(); | |||
|
|||
Raven.captureMessage('Broken!'); | |||
Raven.captureMessage('Broken!', {tags: { key: "value" }}); | |||
+Raven.captureMessage('Broken!', { stacktrace: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks so confusing in the diff view
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
¯_(ツ)_/¯
@@ -75,6 +75,9 @@ declare module Raven { | |||
/** By default, Raven captures as many as 100 breadcrumb entries. If you find this too noisy, you can reduce this number by setting maxBreadcrumbs. Note that this number cannot be set higher than the default of 100. */ | |||
maxBreadcrumbs?: number; | |||
|
|||
/** A function that allows filtering or mutating breadcrumb payloads. Return false to throw away the breadcrumb. */ | |||
breadcrumbCallback?: (data: any) => any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be any->boolean? we don't generally care about correctness with these right? i'm afraid people will return undefined by accident and throw everything away
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeeeeah, it's kinda confusing now. You have to return either payload (an object) or a falsy value to throw it away. This is how we already annotate dataCallback
, therefore I kept the pattern here.
Closes: #1131