Repository navigation
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,11 @@ var options: Raven.RavenOptions = { | |
| xhr: false, | ||
| console: false, | ||
| dom: true, | ||
| location: false | ||
| location: false, | ||
| sentry: true | ||
| }, | ||
| breadcrumbCallback: function (data) { | ||
| return data | ||
| } | ||
| }; | ||
|
|
||
|
|
@@ -60,7 +64,7 @@ var err:Error = Raven.lastException(); | |
|
|
||
| Raven.captureMessage('Broken!'); | ||
| Raven.captureMessage('Broken!', {tags: { key: "value" }}); | ||
| +Raven.captureMessage('Broken!', { stacktrace: true }); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this looks so confusing in the diff view
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😆
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ¯_(ツ)_/¯ |
||
| Raven.captureMessage('Broken!', { stacktrace: true }); | ||
| Raven.captureMessage('Warning', { level: 'warning' }); | ||
| Raven.captureBreadcrumb({ | ||
| message: "This is a breadcrumb message." | ||
|
|
@@ -78,4 +82,4 @@ Raven.showReportDialog({ | |
| eventId: 'abcdef123456' | ||
| }); | ||
|
|
||
| Raven.setDSN('https://public@sentry.io/2'); | ||
| Raven.setDSN('https://public@sentry.io/2'); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| /** | ||
| * A sampling rate to apply to events. A value of 0.0 will send no events, and a value of 1.0 will send all events (default). | ||
| */ | ||
|
|
@@ -283,6 +286,7 @@ declare module Raven { | |
| console?: boolean; | ||
| dom?: boolean; | ||
| location?: boolean; | ||
| sentry?: boolean; | ||
| } | ||
|
|
||
| type LogLevel = "critical" | "error" | "warning" | "info" | "debug"; | ||
|
|
||
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.
sentryis 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