Skip to content

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

Merged
merged 1 commit into from
Nov 16, 2017

Conversation

kamilogorek
Copy link
Contributor

Closes: #1131

@kamilogorek kamilogorek requested a review from a team November 15, 2017 13:09
Copy link
Contributor

@MaxBittker MaxBittker left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

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 });
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

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

😆

Copy link
Contributor Author

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;
Copy link
Contributor

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

Copy link
Contributor Author

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.

@kamilogorek kamilogorek merged commit 8416fed into master Nov 16, 2017
@kamilogorek kamilogorek deleted the breadcrumb-ts branch November 16, 2017 13:24
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.

2 participants