Skip to content

Fix: Log unhandled exceptions in Node.js #30

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 9 commits into from
Oct 14, 2015
38 changes: 29 additions & 9 deletions dist/exceptionless.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface ILog {
}
export interface IEventQueue {
enqueue(event: IEvent): void;
process(): void;
process(isAppExiting?: boolean): void;
suspendProcessing(durationInMinutes?: number, discardFutureQueuedItems?: boolean, clearQueue?: boolean): void;
}
export interface IEnvironmentInfoCollector {
Expand All @@ -43,8 +43,11 @@ export interface IStorage<T> {
getList(searchPattern?: string, limit?: number): IStorageItem<T>[];
remove(path: string): void;
}
export interface ISubmissionAdapter {
sendRequest(request: SubmissionRequest, callback: SubmissionCallback, isAppExiting?: boolean): void;
}
export interface ISubmissionClient {
postEvents(events: IEvent[], config: Configuration, callback: (response: SubmissionResponse) => void): void;
postEvents(events: IEvent[], config: Configuration, callback: (response: SubmissionResponse) => void, isAppExiting?: boolean): void;
postUserDescription(referenceId: string, description: IUserDescription, config: Configuration, callback: (response: SubmissionResponse) => void): void;
getSettings(config: Configuration, callback: (response: SettingsResponse) => void): void;
}
Expand All @@ -59,6 +62,7 @@ export interface IConfigurationSettings {
requestInfoCollector?: IRequestInfoCollector;
submissionBatchSize?: number;
submissionClient?: ISubmissionClient;
submissionAdapter?: ISubmissionAdapter;
storage?: IStorage<any>;
queue?: IEventQueue;
}
Expand Down Expand Up @@ -124,7 +128,7 @@ export declare class DefaultEventQueue implements IEventQueue {
private _queueTimer;
constructor(config: Configuration);
enqueue(event: IEvent): void;
process(): void;
process(isAppExiting?: boolean): void;
private processSubmissionResponse(response, events);
private ensureQueueTimer();
private onProcessQueue();
Expand All @@ -142,6 +146,14 @@ export declare class InMemoryStorage<T> implements IStorage<T> {
getList(searchPattern?: string, limit?: number): IStorageItem<T>[];
remove(path: string): void;
}
export declare class DefaultSubmissionClient implements ISubmissionClient {
configurationVersionHeader: string;
postEvents(events: IEvent[], config: Configuration, callback: (response: SubmissionResponse) => void, isAppExiting?: boolean): void;
postUserDescription(referenceId: string, description: IUserDescription, config: Configuration, callback: (response: SubmissionResponse) => void): void;
getSettings(config: Configuration, callback: (response: SettingsResponse) => void): void;
private createRequest(config, method, path, data?);
private createSubmissionCallback(config, callback);
}
export declare class Utils {
static addRange<T>(target: T[], ...values: T[]): T[];
static getHashCode(source: string): string;
Expand All @@ -164,6 +176,7 @@ export declare class Configuration implements IConfigurationSettings {
moduleCollector: IModuleCollector;
requestInfoCollector: IRequestInfoCollector;
submissionBatchSize: number;
submissionAdapter: ISubmissionAdapter;
submissionClient: ISubmissionClient;
settings: Object;
storage: IStorage<Object>;
Expand Down Expand Up @@ -382,6 +395,17 @@ export interface IStorageItem<T> {
path: string;
value: T;
}
export interface SubmissionCallback {
(status: number, message: string, data?: string, headers?: Object): void;
}
export interface SubmissionRequest {
serverUrl: string;
apiKey: string;
userAgent: string;
method: string;
path: string;
data: string;
}
export declare class SettingsResponse {
success: boolean;
settings: any;
Expand All @@ -403,10 +427,6 @@ export declare class DefaultModuleCollector implements IModuleCollector {
export declare class DefaultRequestInfoCollector implements IRequestInfoCollector {
getRequestInfo(context: EventPluginContext): IRequestInfo;
}
export declare class DefaultSubmissionClient implements ISubmissionClient {
configurationVersionHeader: string;
postEvents(events: IEvent[], config: Configuration, callback: (response: SubmissionResponse) => void): void;
postUserDescription(referenceId: string, description: IUserDescription, config: Configuration, callback: (response: SubmissionResponse) => void): void;
getSettings(config: Configuration, callback: (response: SettingsResponse) => void): void;
sendRequest(config: Configuration, method: string, path: string, data: string, callback: (status: number, message: string, data?: string, headers?: Object) => void): void;
export declare class DefaultSubmissionAdapter implements ISubmissionAdapter {
sendRequest(request: SubmissionRequest, callback: SubmissionCallback, isAppExiting?: boolean): void;
}
134 changes: 79 additions & 55 deletions dist/exceptionless.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/exceptionless.js.map

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions dist/exceptionless.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/exceptionless.min.js.map

Large diffs are not rendered by default.

Loading