diff --git a/typescript/raven-tests.ts b/typescript/raven-tests.ts index b8d40bdce70b..9268e5200727 100644 --- a/typescript/raven-tests.ts +++ b/typescript/raven-tests.ts @@ -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 }); +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'); \ No newline at end of file +Raven.setDSN('https://public@sentry.io/2'); diff --git a/typescript/raven.d.ts b/typescript/raven.d.ts index 755d54c1c1d1..0c2dec761eca 100644 --- a/typescript/raven.d.ts +++ b/typescript/raven.d.ts @@ -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; + /** * 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";