Skip to content

Commit a133b8d

Browse files
committed
Added the ability to send the configuration version when getting settings
This means faster + smaller payloads.
1 parent c8e1f0e commit a133b8d

16 files changed

+236
-201
lines changed

dist/exceptionless.d.ts

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface ISubmissionAdapter {
4646
export interface ISubmissionClient {
4747
postEvents(events: IEvent[], config: Configuration, callback: (response: SubmissionResponse) => void, isAppExiting?: boolean): void;
4848
postUserDescription(referenceId: string, description: IUserDescription, config: Configuration, callback: (response: SubmissionResponse) => void): void;
49-
getSettings(config: Configuration, callback: (response: SettingsResponse) => void): void;
49+
getSettings(config: Configuration, version: number, callback: (response: SettingsResponse) => void): void;
5050
sendHeartbeat(sessionIdOrUserId: string, closeSession: boolean, config: Configuration): void;
5151
}
5252
export interface IConfigurationSettings {
@@ -69,8 +69,9 @@ export declare class SettingsManager {
6969
private static _handlers;
7070
static onChanged(handler: (config: Configuration) => void): void;
7171
static applySavedServerSettings(config: Configuration): void;
72+
static getVersion(config: Configuration): number;
7273
static checkVersion(version: number, config: Configuration): void;
73-
static updateSettings(config: Configuration): void;
74+
static updateSettings(config: Configuration, version?: number): void;
7475
private static changed(config);
7576
private static getSavedServerSettings(config);
7677
}
@@ -152,7 +153,7 @@ export declare class DefaultSubmissionClient implements ISubmissionClient {
152153
configurationVersionHeader: string;
153154
postEvents(events: IEvent[], config: Configuration, callback: (response: SubmissionResponse) => void, isAppExiting?: boolean): void;
154155
postUserDescription(referenceId: string, description: IUserDescription, config: Configuration, callback: (response: SubmissionResponse) => void): void;
155-
getSettings(config: Configuration, callback: (response: SettingsResponse) => void): void;
156+
getSettings(config: Configuration, version: number, callback: (response: SettingsResponse) => void): void;
156157
sendHeartbeat(sessionIdOrUserId: string, closeSession: boolean, config: Configuration): void;
157158
private createRequest(config, method, url, data?);
158159
private createSubmissionCallback(config, callback);
@@ -198,6 +199,8 @@ export declare class Configuration implements IConfigurationSettings {
198199
serverUrl: string;
199200
private _heartbeatServerUrl;
200201
heartbeatServerUrl: string;
202+
private _updateSettingsWhenIdleInterval;
203+
updateSettingsWhenIdleInterval: number;
201204
private _dataExclusions;
202205
private _userAgentBotPatterns;
203206
dataExclusions: string[];
@@ -275,6 +278,8 @@ export declare class SubmissionResponse {
275278
export declare class ExceptionlessClient {
276279
private static _instance;
277280
config: Configuration;
281+
private _intervalId;
282+
private _timeoutId;
278283
constructor();
279284
constructor(settings: IConfigurationSettings);
280285
constructor(apiKey: string, serverUrl?: string);
@@ -378,14 +383,6 @@ export interface IInnerError {
378383
stack_trace?: IStackFrame[];
379384
target_method?: IMethod;
380385
}
381-
export declare class SettingsResponse {
382-
success: boolean;
383-
settings: any;
384-
settingsVersion: number;
385-
message: string;
386-
exception: any;
387-
constructor(success: boolean, settings: any, settingsVersion?: number, exception?: any, message?: string);
388-
}
389386
export declare class ConfigurationDefaultsPlugin implements IEventPlugin {
390387
priority: number;
391388
name: string;
@@ -429,14 +426,13 @@ export declare class EventExclusionPlugin implements IEventPlugin {
429426
name: string;
430427
run(context: EventPluginContext, next?: () => void): void;
431428
}
432-
export declare class UpdateConfigurationSettingsWhileIdlePlugin implements IEventPlugin {
433-
priority: number;
434-
name: string;
435-
private _config;
436-
private _interval;
437-
private _intervalId;
438-
constructor(config: Configuration, interval?: number);
439-
run(context: EventPluginContext, next?: () => void): void;
429+
export declare class SettingsResponse {
430+
success: boolean;
431+
settings: any;
432+
settingsVersion: number;
433+
message: string;
434+
exception: any;
435+
constructor(success: boolean, settings: any, settingsVersion?: number, exception?: any, message?: string);
440436
}
441437
export interface IError extends IInnerError {
442438
modules?: IModule[];

dist/exceptionless.js

Lines changed: 69 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)