raven-js module has been declared

This commit is contained in:
Alexander Rusakov
2016-03-09 16:46:10 +03:00
parent 3a86e056dc
commit ecd58a45b5
2 changed files with 20 additions and 12 deletions
+4
View File
@@ -1,5 +1,9 @@
/// <reference path="ravenjs.d.ts" />
import RavenJS from 'raven-js';
RavenJS.config('https://public@getsentry.com/1').install();
var options: RavenOptions = {
logger: 'my-logger',
ignoreUrls: [
+16 -12
View File
@@ -5,16 +5,20 @@
declare var Raven: RavenStatic;
declare module 'raven-js' {
export default Raven;
}
interface RavenOptions {
/** The log level associated with this event. Default: error */
level?: string;
/** The name of the logger used by Sentry. Default: javascript */
logger?: string;
/** The release version of the application you are monitoring with Sentry */
release?: string;
/** The name of the server or device that the client is running on */
serverName?: string;
@@ -36,19 +40,19 @@ interface RavenOptions {
};
extra?: any;
/** In some cases you may see issues where Sentry groups multiple events together when they should be separate entities. In other cases, Sentry simply doesnt group events together because theyre so sporadic that they never look the same. */
fingerprint?: string[];
/** A function which allows mutation of the data payload right before being sent to Sentry */
dataCallback?: (data: any) => any;
/** A callback function that allows you to apply your own filters to determine if the message should be sent to Sentry. */
shouldSendCallback?: (data: any) => boolean;
/** By default, Raven does not truncate messages. If you need to truncate characters for whatever reason, you may set this to limit the length. */
maxMessageLength?: number;
/** Override the default HTTP data transport handler. */
transport?: (options: RavenTransportOptions) => void;
}
@@ -57,7 +61,7 @@ interface RavenStatic {
/** Raven.js version. */
VERSION: string;
Plugins: { [id: string]: RavenPlugin };
/*
@@ -94,7 +98,7 @@ interface RavenStatic {
* @return {Raven}
*/
install(): RavenStatic;
/*
* Adds a plugin to Raven
*
@@ -166,13 +170,13 @@ interface RavenStatic {
username?: string;
email?: string;
}): RavenStatic;
/** Override the default HTTP data transport handler. */
setTransport(transportFunction: (options: RavenTransportOptions) => void): RavenStatic;
/** An event id is a globally unique id for the event that was just sent. This event id can be used to find the exact event from within Sentry. */
lastEventId(): string;
/** If you need to conditionally check if raven needs to be initialized or not, you can use the isSetup function. It will return true if Raven is already initialized. */
isSetup(): boolean;
}