@microsoft/applicationinsights-web 2.8.0-beta.2203-04 → 2.8.0-beta.2203-07
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{ai.2.8.0-beta.2203-04.cjs.js → ai.2.8.0-beta.2203-07.cjs.js} +668 -370
- package/browser/ai.2.8.0-beta.2203-07.cjs.js.map +1 -0
- package/browser/ai.2.8.0-beta.2203-07.cjs.min.js +6 -0
- package/browser/ai.2.8.0-beta.2203-07.cjs.min.js.map +1 -0
- package/browser/{ai.2.8.0-beta.2203-04.gbl.js → ai.2.8.0-beta.2203-07.gbl.js} +668 -370
- package/browser/ai.2.8.0-beta.2203-07.gbl.js.map +1 -0
- package/browser/ai.2.8.0-beta.2203-07.gbl.min.js +6 -0
- package/browser/ai.2.8.0-beta.2203-07.gbl.min.js.map +1 -0
- package/browser/ai.2.8.0-beta.2203-07.integrity.json +66 -0
- package/browser/{ai.2.8.0-beta.2203-04.js → ai.2.8.0-beta.2203-07.js} +668 -370
- package/browser/ai.2.8.0-beta.2203-07.js.map +1 -0
- package/browser/ai.2.8.0-beta.2203-07.min.js +6 -0
- package/browser/ai.2.8.0-beta.2203-07.min.js.map +1 -0
- package/browser/ai.2.cjs.js +667 -369
- package/browser/ai.2.cjs.js.map +1 -1
- package/browser/ai.2.cjs.min.js +2 -2
- package/browser/ai.2.cjs.min.js.map +1 -1
- package/browser/ai.2.gbl.js +667 -369
- package/browser/ai.2.gbl.js.map +1 -1
- package/browser/ai.2.gbl.min.js +2 -2
- package/browser/ai.2.gbl.min.js.map +1 -1
- package/browser/ai.2.js +667 -369
- package/browser/ai.2.js.map +1 -1
- package/browser/ai.2.min.js +2 -2
- package/browser/ai.2.min.js.map +1 -1
- package/dist/applicationinsights-web.api.json +429 -176
- package/dist/applicationinsights-web.api.md +20 -25
- package/dist/applicationinsights-web.d.ts +145 -110
- package/dist/applicationinsights-web.js +668 -370
- package/dist/applicationinsights-web.js.map +1 -1
- package/dist/applicationinsights-web.min.js +2 -2
- package/dist/applicationinsights-web.min.js.map +1 -1
- package/dist/applicationinsights-web.rollup.d.ts +145 -110
- package/dist-esm/ApplicationInsightsContainer.js +1 -1
- package/dist-esm/ApplicationInsightsDeprecated.js +1 -1
- package/dist-esm/Init.js +1 -1
- package/dist-esm/Initialization.js +1 -1
- package/dist-esm/applicationinsights-web.js +1 -1
- package/package.json +7 -7
- package/types/Initialization.d.ts +1 -1
- package/browser/ai.2.8.0-beta.2203-04.cjs.js.map +0 -1
- package/browser/ai.2.8.0-beta.2203-04.cjs.min.js +0 -6
- package/browser/ai.2.8.0-beta.2203-04.cjs.min.js.map +0 -1
- package/browser/ai.2.8.0-beta.2203-04.gbl.js.map +0 -1
- package/browser/ai.2.8.0-beta.2203-04.gbl.min.js +0 -6
- package/browser/ai.2.8.0-beta.2203-04.gbl.min.js.map +0 -1
- package/browser/ai.2.8.0-beta.2203-04.integrity.json +0 -66
- package/browser/ai.2.8.0-beta.2203-04.js.map +0 -1
- package/browser/ai.2.8.0-beta.2203-04.min.js +0 -6
- package/browser/ai.2.8.0-beta.2203-04.min.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft.ApplicationInsights, 2.8.0-beta.2203-
|
|
2
|
+
* Microsoft.ApplicationInsights, 2.8.0-beta.2203-07
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -54,16 +54,12 @@ export declare class AppInsightsCore extends BaseCore implements IAppInsightsCor
|
|
|
54
54
|
|
|
55
55
|
export declare class ApplicationAnalytics extends BaseTelemetryPlugin implements IAppInsights, IAppInsightsInternal {
|
|
56
56
|
static Version: string;
|
|
57
|
-
static getDefaultConfig
|
|
57
|
+
static getDefaultConfig: typeof _getDefaultConfig;
|
|
58
58
|
identifier: string;
|
|
59
59
|
priority: number;
|
|
60
60
|
config: IConfig;
|
|
61
61
|
queue: Array<() => void>;
|
|
62
62
|
autoRoutePVDelay: number;
|
|
63
|
-
protected _telemetryInitializers: Array<(envelope: ITelemetryItem) => boolean | void>;
|
|
64
|
-
protected _pageViewManager: PageViewManager;
|
|
65
|
-
protected _pageViewPerformanceManager: PageViewPerformanceManager;
|
|
66
|
-
protected _pageVisitTimeManager: PageVisitTimeManager;
|
|
67
63
|
constructor();
|
|
68
64
|
/**
|
|
69
65
|
* Get the current cookie manager for this instance
|
|
@@ -187,7 +183,7 @@ export declare class ApplicationAnalytics extends BaseTelemetryPlugin implements
|
|
|
187
183
|
* @memberof ApplicationInsights
|
|
188
184
|
*/
|
|
189
185
|
_onerror(exception: IAutoExceptionTelemetry): void;
|
|
190
|
-
addTelemetryInitializer(telemetryInitializer: (item: ITelemetryItem) => boolean | void): void;
|
|
186
|
+
addTelemetryInitializer(telemetryInitializer: (item: ITelemetryItem) => boolean | void): ITelemetryInitializerHandler | void;
|
|
191
187
|
initialize(config: IConfiguration & IConfig, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
|
|
192
188
|
}
|
|
193
189
|
|
|
@@ -298,7 +294,7 @@ export declare class ApplicationInsights implements IApplicationInsights {
|
|
|
298
294
|
}, measurements?: {
|
|
299
295
|
[key: string]: number;
|
|
300
296
|
}): void;
|
|
301
|
-
addTelemetryInitializer(telemetryInitializer: (item: ITelemetryItem) => boolean | void): void;
|
|
297
|
+
addTelemetryInitializer(telemetryInitializer: (item: ITelemetryItem) => boolean | void): void | ITelemetryInitializerHandler;
|
|
302
298
|
/**
|
|
303
299
|
* Set the authenticated user id and the account id. Used for identifying a specific signed-in user. Parameters must not contain whitespace or ,;=|
|
|
304
300
|
*
|
|
@@ -430,10 +426,20 @@ export declare class BaseCore implements IAppInsightsCore {
|
|
|
430
426
|
* approach is to create a new instance and initialize that instance.
|
|
431
427
|
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
432
428
|
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
429
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
430
|
+
* @param unloadComplete - An optional callback that will be called once the unload has completed
|
|
431
|
+
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the unload. Defaults to 5 seconds.
|
|
433
432
|
*/
|
|
434
|
-
unload(isAsync?: boolean, unloadComplete?: () => void): void;
|
|
433
|
+
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void;
|
|
435
434
|
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
436
|
-
|
|
435
|
+
/**
|
|
436
|
+
* Add a new plugin to the installation
|
|
437
|
+
* @param plugin - The new plugin to add
|
|
438
|
+
* @param replaceExisting - should any existing plugin be replaced, default is false
|
|
439
|
+
* @param doAsync - Should the add be performed asynchronously
|
|
440
|
+
* @param addCb - [Optional] callback to call after the plugin has been added
|
|
441
|
+
*/
|
|
442
|
+
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
|
|
437
443
|
/**
|
|
438
444
|
* Returns the unique event namespace that should be used
|
|
439
445
|
*/
|
|
@@ -443,7 +449,23 @@ export declare class BaseCore implements IAppInsightsCore {
|
|
|
443
449
|
* @param handler - the handler
|
|
444
450
|
*/
|
|
445
451
|
addUnloadCb(handler: UnloadHandler): void;
|
|
452
|
+
/**
|
|
453
|
+
* Flush and send any batched / cached data immediately
|
|
454
|
+
* @param async - send data asynchronously when true (defaults to true)
|
|
455
|
+
* @param callBack - if specified, notify caller when send is complete, the channel should return true to indicate to the caller that it will be called.
|
|
456
|
+
* If the caller doesn't return true the caller should assume that it may never be called.
|
|
457
|
+
* @param sendReason - specify the reason that you are calling "flush" defaults to ManualFlush (1) if not specified
|
|
458
|
+
* @returns - true if the callback will be return after the flush is complete otherwise the caller should assume that any provided callback will never be called
|
|
459
|
+
*/
|
|
460
|
+
flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): void;
|
|
446
461
|
protected releaseQueue(): void;
|
|
462
|
+
/**
|
|
463
|
+
* Hook for Core extensions to allow them to update their own configuration before updating all of the plugins.
|
|
464
|
+
* @param updateCtx - The plugin update context
|
|
465
|
+
* @param updateState - The Update State
|
|
466
|
+
* @returns boolean - True means the extension class will call updateState otherwise the Core will
|
|
467
|
+
*/
|
|
468
|
+
protected _updateHook?(updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState): void | boolean;
|
|
447
469
|
}
|
|
448
470
|
|
|
449
471
|
/**
|
|
@@ -500,6 +522,14 @@ export declare abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
|
|
|
500
522
|
* @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
|
|
501
523
|
*/
|
|
502
524
|
protected _doTeardown?: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void) => void | boolean;
|
|
525
|
+
/**
|
|
526
|
+
* Extension hook to allow implementations to perform some additional update operations before the BaseTelemetryPlugin finishes it's removal
|
|
527
|
+
* @param updateCtx - This is the context that should be used during updating.
|
|
528
|
+
* @param updateState - The details / state of the update process, it holds details like the current and previous configuration.
|
|
529
|
+
* @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async update operations.
|
|
530
|
+
* @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
|
|
531
|
+
*/
|
|
532
|
+
protected _doUpdate?: (updateCtx?: IProcessTelemetryUpdateContext, updateState?: ITelemetryUpdateState, asyncCallback?: () => void) => void | boolean;
|
|
503
533
|
constructor();
|
|
504
534
|
initialize(config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
|
|
505
535
|
/**
|
|
@@ -512,6 +542,13 @@ export declare abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
|
|
|
512
542
|
*/
|
|
513
543
|
teardown(unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState): void | boolean;
|
|
514
544
|
abstract processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
545
|
+
/**
|
|
546
|
+
* The the plugin should re-evaluate configuration and update any cached configuration settings.
|
|
547
|
+
* @param updateCtx - This is the context that should be used during updating.
|
|
548
|
+
* @param updateState - The details / state of the update process, it holds details like the current and previous configuration.
|
|
549
|
+
* @returns boolean - true if the plugin has or will call updateCtx.processNext(), this allows the plugin to perform any asynchronous operations.
|
|
550
|
+
*/
|
|
551
|
+
update(updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState): void | boolean;
|
|
515
552
|
/**
|
|
516
553
|
* Add an unload handler that will be called when the SDK is being unloaded
|
|
517
554
|
* @param handler - the handler
|
|
@@ -983,6 +1020,8 @@ declare const enum FieldType {
|
|
|
983
1020
|
*/
|
|
984
1021
|
declare function _formatErrorCode(errorObj: any): any;
|
|
985
1022
|
|
|
1023
|
+
declare function _getDefaultConfig(config?: IConfig): IConfig;
|
|
1024
|
+
|
|
986
1025
|
declare const enum GetExtCfgMergeType {
|
|
987
1026
|
None = 0,
|
|
988
1027
|
MergeDefaultOnly = 1,
|
|
@@ -1083,8 +1122,11 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
1083
1122
|
* approach is to create a new instance and initialize that instance.
|
|
1084
1123
|
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
1085
1124
|
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
1125
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
1126
|
+
* @param unloadComplete - An optional callback that will be called once the unload has completed
|
|
1127
|
+
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the unload. Defaults to 5 seconds.
|
|
1086
1128
|
*/
|
|
1087
|
-
unload(isAsync?: boolean, unloadComplete?: () => void): void;
|
|
1129
|
+
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void;
|
|
1088
1130
|
/**
|
|
1089
1131
|
* Find and return the (first) plugin with the specified identifier if present
|
|
1090
1132
|
* @param pluginIdentifier
|
|
@@ -1093,10 +1135,11 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
1093
1135
|
/**
|
|
1094
1136
|
* Add a new plugin to the installation
|
|
1095
1137
|
* @param plugin - The new plugin to add
|
|
1096
|
-
* @param replaceExisting - should any existing plugin be replaced
|
|
1138
|
+
* @param replaceExisting - should any existing plugin be replaced, default is false
|
|
1097
1139
|
* @param doAsync - Should the add be performed asynchronously
|
|
1140
|
+
* @param addCb - [Optional] callback to call after the plugin has been added
|
|
1098
1141
|
*/
|
|
1099
|
-
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting
|
|
1142
|
+
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
|
|
1100
1143
|
/**
|
|
1101
1144
|
* Returns the unique event namespace that should be used when registering events
|
|
1102
1145
|
*/
|
|
@@ -1106,6 +1149,16 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
1106
1149
|
* @param handler - the handler
|
|
1107
1150
|
*/
|
|
1108
1151
|
addUnloadCb(handler: UnloadHandler): void;
|
|
1152
|
+
/**
|
|
1153
|
+
* Flush and send any batched / cached data immediately
|
|
1154
|
+
* @param async - send data asynchronously when true (defaults to true)
|
|
1155
|
+
* @param callBack - if specified, notify caller when send is complete, the channel should return true to indicate to the caller that it will be called.
|
|
1156
|
+
* If the caller doesn't return true the caller should assume that it may never be called.
|
|
1157
|
+
* @param sendReason - specify the reason that you are calling "flush" defaults to ManualFlush (1) if not specified
|
|
1158
|
+
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the unload. Defaults to 5 seconds.
|
|
1159
|
+
* @returns - true if the callback will be return after the flush is complete otherwise the caller should assume that any provided callback will never be called
|
|
1160
|
+
*/
|
|
1161
|
+
flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason, cbTimeout?: number): boolean | void;
|
|
1109
1162
|
}
|
|
1110
1163
|
|
|
1111
1164
|
export declare interface IAppInsightsDeprecated {
|
|
@@ -2725,6 +2778,11 @@ declare interface IInstrumentHook {
|
|
|
2725
2778
|
* You must always supply the error callback
|
|
2726
2779
|
*/
|
|
2727
2780
|
declare interface IInstrumentHooksCallbacks {
|
|
2781
|
+
/**
|
|
2782
|
+
* [Optional] Namespace details (same as the namespace used for events), useful for debugging and testing to
|
|
2783
|
+
* identify the source of the instrumented hooks
|
|
2784
|
+
*/
|
|
2785
|
+
ns?: string | string[];
|
|
2728
2786
|
/**
|
|
2729
2787
|
* The hook callback to call before the original function is called
|
|
2730
2788
|
*/
|
|
@@ -3305,8 +3363,8 @@ export declare interface IProcessTelemetryContext extends IBaseProcessingContext
|
|
|
3305
3363
|
}
|
|
3306
3364
|
|
|
3307
3365
|
/**
|
|
3308
|
-
* The current context for the current call to
|
|
3309
|
-
*
|
|
3366
|
+
* The current context for the current call to teardown() implementations, used to support when plugins are being removed
|
|
3367
|
+
* or the SDK is being unloaded.
|
|
3310
3368
|
*/
|
|
3311
3369
|
declare interface IProcessTelemetryUnloadContext extends IBaseProcessingContext {
|
|
3312
3370
|
/**
|
|
@@ -3325,6 +3383,27 @@ declare interface IProcessTelemetryUnloadContext extends IBaseProcessingContext
|
|
|
3325
3383
|
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryUnloadContext;
|
|
3326
3384
|
}
|
|
3327
3385
|
|
|
3386
|
+
/**
|
|
3387
|
+
* The current context for the current call to the plugin update() implementations, used to support the notifications
|
|
3388
|
+
* for when plugins are added, removed or the configuration was changed.
|
|
3389
|
+
*/
|
|
3390
|
+
declare interface IProcessTelemetryUpdateContext extends IBaseProcessingContext {
|
|
3391
|
+
/**
|
|
3392
|
+
* This Plugin has finished unloading, so unload the next one
|
|
3393
|
+
* @param updateState - The update State
|
|
3394
|
+
* @returns boolean (true) if there is no more plugins to process otherwise false or undefined (void)
|
|
3395
|
+
*/
|
|
3396
|
+
processNext: (updateState: ITelemetryUpdateState) => boolean | void;
|
|
3397
|
+
/**
|
|
3398
|
+
* Create a new context using the core and config from the current instance, returns a new instance of the same type
|
|
3399
|
+
* @param plugins - The execution order to process the plugins, if null or not supplied
|
|
3400
|
+
* then the current execution order will be copied.
|
|
3401
|
+
* @param startAt - The plugin to start processing from, if missing from the execution
|
|
3402
|
+
* order then the next plugin will be NOT set.
|
|
3403
|
+
*/
|
|
3404
|
+
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryUpdateContext;
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3328
3407
|
declare interface IPropertiesPlugin {
|
|
3329
3408
|
readonly context: ITelemetryContext;
|
|
3330
3409
|
}
|
|
@@ -3721,6 +3800,15 @@ declare interface ITelemetryProcessor {
|
|
|
3721
3800
|
* to later plugins (vs appending items to the telemetry item)
|
|
3722
3801
|
*/
|
|
3723
3802
|
processTelemetry: (env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => void;
|
|
3803
|
+
/**
|
|
3804
|
+
* The the plugin should re-evaluate configuration and update any cached configuration settings or
|
|
3805
|
+
* plugins. If implemented this method will be called whenever a plugin is added or removed and if
|
|
3806
|
+
* the configuration has bee updated.
|
|
3807
|
+
* @param updateCtx - This is the context that should be used during updating.
|
|
3808
|
+
* @param updateState - The details / state of the update process, it holds details like the current and previous configuration.
|
|
3809
|
+
* @returns boolean - true if the plugin has or will call updateCtx.processNext(), this allows the plugin to perform any asynchronous operations.
|
|
3810
|
+
*/
|
|
3811
|
+
update?: (updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState) => void | boolean;
|
|
3724
3812
|
}
|
|
3725
3813
|
|
|
3726
3814
|
declare interface ITelemetryTrace {
|
|
@@ -3748,6 +3836,27 @@ declare interface ITelemetryUnloadState {
|
|
|
3748
3836
|
flushComplete?: boolean;
|
|
3749
3837
|
}
|
|
3750
3838
|
|
|
3839
|
+
declare interface ITelemetryUpdateState {
|
|
3840
|
+
/**
|
|
3841
|
+
* Identifies the reason for the update notification, this is a bitwise numeric value
|
|
3842
|
+
*/
|
|
3843
|
+
reason: TelemetryUpdateReason;
|
|
3844
|
+
/**
|
|
3845
|
+
* If this is a configuration update this was the previous configuration that was used
|
|
3846
|
+
*/
|
|
3847
|
+
/**
|
|
3848
|
+
* If this is a configuration update is the new configuration that is being used
|
|
3849
|
+
*/
|
|
3850
|
+
/**
|
|
3851
|
+
* This holds a collection of plugins that have been added (if the reason identifies that one or more plugins have been added)
|
|
3852
|
+
*/
|
|
3853
|
+
added?: IPlugin[];
|
|
3854
|
+
/**
|
|
3855
|
+
* This holds a collection of plugins that have been removed (if the reason identifies that one or more plugins have been removed)
|
|
3856
|
+
*/
|
|
3857
|
+
removed?: IPlugin[];
|
|
3858
|
+
}
|
|
3859
|
+
|
|
3751
3860
|
declare interface ITraceState {
|
|
3752
3861
|
}
|
|
3753
3862
|
|
|
@@ -4193,26 +4302,6 @@ declare class PageViewData extends EventData {
|
|
|
4193
4302
|
constructor();
|
|
4194
4303
|
}
|
|
4195
4304
|
|
|
4196
|
-
/**
|
|
4197
|
-
* Class encapsulates sending page views and page view performance telemetry.
|
|
4198
|
-
*/
|
|
4199
|
-
declare class PageViewManager {
|
|
4200
|
-
constructor(appInsights: IAppInsightsInternal, overridePageViewDuration: boolean, core: IAppInsightsCore, pageViewPerformanceManager: PageViewPerformanceManager);
|
|
4201
|
-
/**
|
|
4202
|
-
* Currently supported cases:
|
|
4203
|
-
* 1) (default case) track page view called with default parameters, overridePageViewDuration = false. Page view is sent with page view performance when navigation timing data is available.
|
|
4204
|
-
* a. If navigation timing is not supported then page view is sent right away with undefined duration. Page view performance is not sent.
|
|
4205
|
-
* 2) overridePageViewDuration = true, custom duration provided. Custom duration is used, page view sends right away.
|
|
4206
|
-
* 3) overridePageViewDuration = true, custom duration NOT provided. Page view is sent right away, duration is time spent from page load till now (or undefined if navigation timing is not supported).
|
|
4207
|
-
* 4) overridePageViewDuration = false, custom duration is provided. Page view is sent right away with custom duration.
|
|
4208
|
-
*
|
|
4209
|
-
* In all cases page view performance is sent once (only for the 1st call of trackPageView), or not sent if navigation timing is not supported.
|
|
4210
|
-
*/
|
|
4211
|
-
trackPageView(pageView: IPageViewTelemetry, customProperties?: {
|
|
4212
|
-
[key: string]: any;
|
|
4213
|
-
}): void;
|
|
4214
|
-
}
|
|
4215
|
-
|
|
4216
4305
|
/**
|
|
4217
4306
|
* An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request.
|
|
4218
4307
|
*/
|
|
@@ -4290,81 +4379,6 @@ export declare class PageViewPerformance extends PageViewPerfData implements ISe
|
|
|
4290
4379
|
}, cs4BaseData?: IPageViewPerformanceTelemetry);
|
|
4291
4380
|
}
|
|
4292
4381
|
|
|
4293
|
-
/**
|
|
4294
|
-
* Class encapsulates sending page view performance telemetry.
|
|
4295
|
-
*/
|
|
4296
|
-
declare class PageViewPerformanceManager {
|
|
4297
|
-
private _logger;
|
|
4298
|
-
private MAX_DURATION_ALLOWED;
|
|
4299
|
-
constructor(core: IAppInsightsCore);
|
|
4300
|
-
populatePageViewPerformanceEvent(pageViewPerformance: IPageViewPerformanceTelemetryInternal): void;
|
|
4301
|
-
getPerformanceTiming(): PerformanceTiming | null;
|
|
4302
|
-
getPerformanceNavigationTiming(): PerformanceNavigationTiming | null;
|
|
4303
|
-
/**
|
|
4304
|
-
* Returns true is window PerformanceNavigationTiming API is supported, false otherwise.
|
|
4305
|
-
*/
|
|
4306
|
-
isPerformanceNavigationTimingSupported(): boolean;
|
|
4307
|
-
/**
|
|
4308
|
-
* Returns true is window performance timing API is supported, false otherwise.
|
|
4309
|
-
*/
|
|
4310
|
-
isPerformanceTimingSupported(): PerformanceTiming;
|
|
4311
|
-
/**
|
|
4312
|
-
* As page loads different parts of performance timing numbers get set. When all of them are set we can report it.
|
|
4313
|
-
* Returns true if ready, false otherwise.
|
|
4314
|
-
*/
|
|
4315
|
-
isPerformanceTimingDataReady(): boolean;
|
|
4316
|
-
/**
|
|
4317
|
-
* This method tells if given durations should be excluded from collection.
|
|
4318
|
-
*/
|
|
4319
|
-
shouldCollectDuration(...durations: number[]): boolean;
|
|
4320
|
-
}
|
|
4321
|
-
|
|
4322
|
-
declare class PageVisitData {
|
|
4323
|
-
pageName: string;
|
|
4324
|
-
pageUrl: string;
|
|
4325
|
-
pageVisitStartTime: number;
|
|
4326
|
-
pageVisitTime: number;
|
|
4327
|
-
constructor(pageName: string, pageUrl: string);
|
|
4328
|
-
}
|
|
4329
|
-
|
|
4330
|
-
/**
|
|
4331
|
-
* Used to track page visit durations
|
|
4332
|
-
*/
|
|
4333
|
-
declare class PageVisitTimeManager {
|
|
4334
|
-
private prevPageVisitDataKeyName;
|
|
4335
|
-
private pageVisitTimeTrackingHandler;
|
|
4336
|
-
private _logger;
|
|
4337
|
-
/**
|
|
4338
|
-
* Creates a new instance of PageVisitTimeManager
|
|
4339
|
-
* @param pageVisitTimeTrackingHandler Delegate that will be called to send telemetry data to AI (when trackPreviousPageVisit is called)
|
|
4340
|
-
* @returns {}
|
|
4341
|
-
*/
|
|
4342
|
-
constructor(logger: IDiagnosticLogger, pageVisitTimeTrackingHandler: (pageName: string, pageUrl: string, pageVisitTime: number) => void);
|
|
4343
|
-
/**
|
|
4344
|
-
* Tracks the previous page visit time telemetry (if exists) and starts timing of new page visit time
|
|
4345
|
-
* @param currentPageName Name of page to begin timing for visit duration
|
|
4346
|
-
* @param currentPageUrl Url of page to begin timing for visit duration
|
|
4347
|
-
*/
|
|
4348
|
-
trackPreviousPageVisit(currentPageName: string, currentPageUrl: string): void;
|
|
4349
|
-
/**
|
|
4350
|
-
* Stops timing of current page (if exists) and starts timing for duration of visit to pageName
|
|
4351
|
-
* @param pageName Name of page to begin timing visit duration
|
|
4352
|
-
* @returns {PageVisitData} Page visit data (including duration) of pageName from last call to start or restart, if exists. Null if not.
|
|
4353
|
-
*/
|
|
4354
|
-
restartPageVisitTimer(pageName: string, pageUrl: string): PageVisitData;
|
|
4355
|
-
/**
|
|
4356
|
-
* Starts timing visit duration of pageName
|
|
4357
|
-
* @param pageName
|
|
4358
|
-
* @returns {}
|
|
4359
|
-
*/
|
|
4360
|
-
startPageVisitTimer(pageName: string, pageUrl: string): void;
|
|
4361
|
-
/**
|
|
4362
|
-
* Stops timing of current page, if exists.
|
|
4363
|
-
* @returns {PageVisitData} Page visit data (including duration) of pageName from call to start, if exists. Null if not.
|
|
4364
|
-
*/
|
|
4365
|
-
stopPageVisitTimer(): PageVisitData;
|
|
4366
|
-
}
|
|
4367
|
-
|
|
4368
4382
|
declare function parseConnectionString(connectionString?: string): ConnectionString;
|
|
4369
4383
|
|
|
4370
4384
|
export declare class PerfEvent implements IPerfEvent {
|
|
@@ -4856,6 +4870,27 @@ declare const enum TelemetryUnloadReason {
|
|
|
4856
4870
|
SdkUnload = 50
|
|
4857
4871
|
}
|
|
4858
4872
|
|
|
4873
|
+
/**
|
|
4874
|
+
* The TelemetryUpdateReason enumeration contains a set of bit-wise values that specify the reason for update request.
|
|
4875
|
+
*/
|
|
4876
|
+
declare const enum TelemetryUpdateReason {
|
|
4877
|
+
/**
|
|
4878
|
+
* Unknown.
|
|
4879
|
+
*/
|
|
4880
|
+
Unknown = 0,
|
|
4881
|
+
/**
|
|
4882
|
+
* The configuration has ben updated or changed
|
|
4883
|
+
*/
|
|
4884
|
+
/**
|
|
4885
|
+
* One or more plugins have been added
|
|
4886
|
+
*/
|
|
4887
|
+
PluginAdded = 16,
|
|
4888
|
+
/**
|
|
4889
|
+
* One or more plugins have been removed
|
|
4890
|
+
*/
|
|
4891
|
+
PluginRemoved = 32
|
|
4892
|
+
}
|
|
4893
|
+
|
|
4859
4894
|
export declare class Trace extends MessageData implements ISerializable {
|
|
4860
4895
|
static envelopeType: string;
|
|
4861
4896
|
static dataType: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Web, 2.8.0-beta.2203-
|
|
2
|
+
* Application Insights JavaScript SDK - Web, 2.8.0-beta.2203-07
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import { AppInsightsDeprecated } from "./ApplicationInsightsDeprecated";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Web, 2.8.0-beta.2203-
|
|
2
|
+
* Application Insights JavaScript SDK - Web, 2.8.0-beta.2203-07
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import { stringToBoolOrDefault, ProcessLegacy } from "@microsoft/applicationinsights-common";
|
package/dist-esm/Init.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Web, 2.8.0-beta.2203-
|
|
2
|
+
* Application Insights JavaScript SDK - Web, 2.8.0-beta.2203-07
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
export { Initialization as ApplicationInsights, Telemetry } from "./Initialization";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-web",
|
|
3
|
-
"version": "2.8.0-beta.2203-
|
|
3
|
+
"version": "2.8.0-beta.2203-07",
|
|
4
4
|
"description": "Microsoft Application Insights JavaScript SDK - Web",
|
|
5
5
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
6
|
"author": "Microsoft Application Insights Team",
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@microsoft/dynamicproto-js": "^1.1.4",
|
|
68
68
|
"@microsoft/applicationinsights-shims": "2.0.1",
|
|
69
|
-
"@microsoft/applicationinsights-analytics-js": "2.8.0-beta.2203-
|
|
70
|
-
"@microsoft/applicationinsights-channel-js": "2.8.0-beta.2203-
|
|
71
|
-
"@microsoft/applicationinsights-common": "2.8.0-beta.2203-
|
|
72
|
-
"@microsoft/applicationinsights-core-js": "2.8.0-beta.2203-
|
|
73
|
-
"@microsoft/applicationinsights-dependencies-js": "2.8.0-beta.2203-
|
|
74
|
-
"@microsoft/applicationinsights-properties-js": "2.8.0-beta.2203-
|
|
69
|
+
"@microsoft/applicationinsights-analytics-js": "2.8.0-beta.2203-07",
|
|
70
|
+
"@microsoft/applicationinsights-channel-js": "2.8.0-beta.2203-07",
|
|
71
|
+
"@microsoft/applicationinsights-common": "2.8.0-beta.2203-07",
|
|
72
|
+
"@microsoft/applicationinsights-core-js": "2.8.0-beta.2203-07",
|
|
73
|
+
"@microsoft/applicationinsights-dependencies-js": "2.8.0-beta.2203-07",
|
|
74
|
+
"@microsoft/applicationinsights-properties-js": "2.8.0-beta.2203-07"
|
|
75
75
|
},
|
|
76
76
|
"license": "MIT",
|
|
77
77
|
"publishConfig": {
|
|
@@ -191,7 +191,7 @@ export declare class Initialization implements IApplicationInsights {
|
|
|
191
191
|
}, measurements?: {
|
|
192
192
|
[key: string]: number;
|
|
193
193
|
}): void;
|
|
194
|
-
addTelemetryInitializer(telemetryInitializer: (item: ITelemetryItem) => boolean | void): void;
|
|
194
|
+
addTelemetryInitializer(telemetryInitializer: (item: ITelemetryItem) => boolean | void): void | import("@microsoft/applicationinsights-core-js").ITelemetryInitializerHandler;
|
|
195
195
|
/**
|
|
196
196
|
* Set the authenticated user id and the account id. Used for identifying a specific signed-in user. Parameters must not contain whitespace or ,;=|
|
|
197
197
|
*
|