@microsoft/applicationinsights-web-basic 2.8.0-beta.2203-02 → 2.8.0-beta.2203-03
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/aib.2.8.0-beta.2203-03.integrity.json +26 -0
- package/browser/{aib.2.8.0-beta.2203-02.js → aib.2.8.0-beta.2203-03.js} +198 -12
- package/browser/aib.2.8.0-beta.2203-03.js.map +1 -0
- package/browser/aib.2.8.0-beta.2203-03.min.js +6 -0
- package/browser/aib.2.8.0-beta.2203-03.min.js.map +1 -0
- package/browser/aib.2.js +197 -11
- package/browser/aib.2.js.map +1 -1
- package/browser/aib.2.min.js +2 -2
- package/browser/aib.2.min.js.map +1 -1
- package/dist/applicationinsights-web-basic.api.json +228 -0
- package/dist/applicationinsights-web-basic.api.md +5 -1
- package/dist/applicationinsights-web-basic.d.ts +62 -2
- package/dist/applicationinsights-web-basic.js +197 -11
- package/dist/applicationinsights-web-basic.js.map +1 -1
- package/dist/applicationinsights-web-basic.min.js +2 -2
- package/dist/applicationinsights-web-basic.min.js.map +1 -1
- package/dist/applicationinsights-web-basic.rollup.d.ts +62 -2
- package/dist-esm/index.js +1 -1
- package/package.json +4 -4
- package/browser/aib.2.8.0-beta.2203-02.integrity.json +0 -26
- package/browser/aib.2.8.0-beta.2203-02.js.map +0 -1
- package/browser/aib.2.8.0-beta.2203-02.min.js +0 -6
- package/browser/aib.2.8.0-beta.2203-02.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-03
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -106,11 +106,26 @@ declare class BaseCore implements IAppInsightsCore {
|
|
|
106
106
|
* @returns - A ITelemetryInitializerHandler to enable the initializer to be removed
|
|
107
107
|
*/
|
|
108
108
|
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
|
|
109
|
+
/**
|
|
110
|
+
* Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered
|
|
111
|
+
* to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous
|
|
112
|
+
* unload call return `true` stating that all plugins reported that they also unloaded, the recommended
|
|
113
|
+
* approach is to create a new instance and initialize that instance.
|
|
114
|
+
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
115
|
+
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
116
|
+
*/
|
|
117
|
+
unload(isAsync?: boolean, unloadComplete?: () => void): void;
|
|
109
118
|
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
119
|
+
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting: boolean, doAsync: boolean, addCb?: (added?: boolean) => void): void;
|
|
110
120
|
/**
|
|
111
121
|
* Returns the unique event namespace that should be used
|
|
112
122
|
*/
|
|
113
123
|
evtNamespace(): string;
|
|
124
|
+
/**
|
|
125
|
+
* Add an unload handler that will be called when the SDK is being unloaded
|
|
126
|
+
* @param handler - the handler
|
|
127
|
+
*/
|
|
128
|
+
addUnloadCb(handler: UnloadHandler): void;
|
|
114
129
|
protected releaseQueue(): void;
|
|
115
130
|
}
|
|
116
131
|
|
|
@@ -180,6 +195,11 @@ declare abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
|
|
|
180
195
|
*/
|
|
181
196
|
teardown(unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState): void | boolean;
|
|
182
197
|
abstract processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
198
|
+
/**
|
|
199
|
+
* Add an unload handler that will be called when the SDK is being unloaded
|
|
200
|
+
* @param handler - the handler
|
|
201
|
+
*/
|
|
202
|
+
protected _addUnloadCb(handler: UnloadHandler): void;
|
|
183
203
|
/**
|
|
184
204
|
* Add this hook so that it is automatically removed during unloading
|
|
185
205
|
* @param hooks - The single hook or an array of IInstrumentHook objects
|
|
@@ -367,15 +387,36 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
367
387
|
* Return a new instance of the IProcessTelemetryContext for processing events
|
|
368
388
|
*/
|
|
369
389
|
getProcessTelContext(): IProcessTelemetryContext;
|
|
390
|
+
/**
|
|
391
|
+
* Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered
|
|
392
|
+
* to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous
|
|
393
|
+
* unload call return `true` stating that all plugins reported that they also unloaded, the recommended
|
|
394
|
+
* approach is to create a new instance and initialize that instance.
|
|
395
|
+
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
396
|
+
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
397
|
+
*/
|
|
398
|
+
unload(isAsync?: boolean, unloadComplete?: () => void): void;
|
|
370
399
|
/**
|
|
371
400
|
* Find and return the (first) plugin with the specified identifier if present
|
|
372
401
|
* @param pluginIdentifier
|
|
373
402
|
*/
|
|
374
403
|
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
404
|
+
/**
|
|
405
|
+
* Add a new plugin to the installation
|
|
406
|
+
* @param plugin - The new plugin to add
|
|
407
|
+
* @param replaceExisting - should any existing plugin be replaced
|
|
408
|
+
* @param doAsync - Should the add be performed asynchronously
|
|
409
|
+
*/
|
|
410
|
+
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting: boolean, doAsync: boolean, addCb?: (added?: boolean) => void): void;
|
|
375
411
|
/**
|
|
376
412
|
* Returns the unique event namespace that should be used when registering events
|
|
377
413
|
*/
|
|
378
414
|
evtNamespace(): string;
|
|
415
|
+
/**
|
|
416
|
+
* Add a handler that will be called when the SDK is being unloaded
|
|
417
|
+
* @param handler - the handler
|
|
418
|
+
*/
|
|
419
|
+
addUnloadCb(handler: UnloadHandler): void;
|
|
379
420
|
}
|
|
380
421
|
|
|
381
422
|
/**
|
|
@@ -1466,6 +1507,7 @@ declare interface ILoadedPlugin<T extends IPlugin> {
|
|
|
1466
1507
|
* (unless it's also been re-initialized)
|
|
1467
1508
|
*/
|
|
1468
1509
|
setEnabled: (isEnabled: boolean) => void;
|
|
1510
|
+
remove: (isAsync?: boolean, removeCb?: (removed?: boolean) => void) => void;
|
|
1469
1511
|
}
|
|
1470
1512
|
|
|
1471
1513
|
export declare interface IMetricTelemetry extends IPartC {
|
|
@@ -2348,6 +2390,10 @@ declare const enum SendRequestReason {
|
|
|
2348
2390
|
* The event(s) being sent as a retry
|
|
2349
2391
|
*/
|
|
2350
2392
|
Retry = 5,
|
|
2393
|
+
/**
|
|
2394
|
+
* The SDK is unloading
|
|
2395
|
+
*/
|
|
2396
|
+
SdkUnload = 6,
|
|
2351
2397
|
/**
|
|
2352
2398
|
* Maximum batch size would be exceeded
|
|
2353
2399
|
*/
|
|
@@ -2382,9 +2428,23 @@ declare const enum TelemetryUnloadReason {
|
|
|
2382
2428
|
/**
|
|
2383
2429
|
* Teardown has been called without any context.
|
|
2384
2430
|
*/
|
|
2385
|
-
ManualTeardown = 0
|
|
2431
|
+
ManualTeardown = 0,
|
|
2432
|
+
/**
|
|
2433
|
+
* Just this plugin is being removed
|
|
2434
|
+
*/
|
|
2435
|
+
PluginUnload = 1,
|
|
2436
|
+
/**
|
|
2437
|
+
* This instance of the plugin is being removed and replaced
|
|
2438
|
+
*/
|
|
2439
|
+
PluginReplace = 2,
|
|
2440
|
+
/**
|
|
2441
|
+
* The entire SDK is being unloaded
|
|
2442
|
+
*/
|
|
2443
|
+
SdkUnload = 50
|
|
2386
2444
|
}
|
|
2387
2445
|
|
|
2446
|
+
declare type UnloadHandler = (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
2447
|
+
|
|
2388
2448
|
declare interface XDomainRequest extends XMLHttpRequestEventTarget {
|
|
2389
2449
|
readonly responseText: string;
|
|
2390
2450
|
send(payload: string): void;
|
package/dist-esm/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-web-basic",
|
|
3
|
-
"version": "2.8.0-beta.2203-
|
|
3
|
+
"version": "2.8.0-beta.2203-03",
|
|
4
4
|
"description": "Microsoft Application Insights Javascript SDK core and channel",
|
|
5
5
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
6
|
"author": "Microsoft Application Insights Team",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@microsoft/dynamicproto-js": "^1.1.4",
|
|
51
51
|
"@microsoft/applicationinsights-shims": "2.0.1",
|
|
52
|
-
"@microsoft/applicationinsights-common": "2.8.0-beta.2203-
|
|
53
|
-
"@microsoft/applicationinsights-channel-js": "2.8.0-beta.2203-
|
|
54
|
-
"@microsoft/applicationinsights-core-js": "2.8.0-beta.2203-
|
|
52
|
+
"@microsoft/applicationinsights-common": "2.8.0-beta.2203-03",
|
|
53
|
+
"@microsoft/applicationinsights-channel-js": "2.8.0-beta.2203-03",
|
|
54
|
+
"@microsoft/applicationinsights-core-js": "2.8.0-beta.2203-03"
|
|
55
55
|
},
|
|
56
56
|
"license": "MIT",
|
|
57
57
|
"publishConfig": {
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "aib",
|
|
3
|
-
"version": "2.8.0-beta.2203-02",
|
|
4
|
-
"ext": {
|
|
5
|
-
"@js": {
|
|
6
|
-
"file": "aib.2.8.0-beta.2203-02.js",
|
|
7
|
-
"type": "text/javascript; charset=utf-8",
|
|
8
|
-
"integrity": "sha256-0UJ6Qz9AxedzebIXQPhaYM258vg3O2oS6KmBrzM5tUM= sha384-C0GWlj4YH2IeW0jVKB4bJ6q3pgjyWuRU/RdRnKrmFvNThfSuCXnLNGrMpzy7ajHS sha512-VEN+rKe91Grcf+49tzqSoFKaW2u4YgXb8bWhVLyY206R+Ae/EzFs0+obwdDM1P7YjCPBAlshQPc/XNfjbV9Z/g==",
|
|
9
|
-
"hashes": {
|
|
10
|
-
"sha256": "0UJ6Qz9AxedzebIXQPhaYM258vg3O2oS6KmBrzM5tUM=",
|
|
11
|
-
"sha384": "C0GWlj4YH2IeW0jVKB4bJ6q3pgjyWuRU/RdRnKrmFvNThfSuCXnLNGrMpzy7ajHS",
|
|
12
|
-
"sha512": "VEN+rKe91Grcf+49tzqSoFKaW2u4YgXb8bWhVLyY206R+Ae/EzFs0+obwdDM1P7YjCPBAlshQPc/XNfjbV9Z/g=="
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"@min.js": {
|
|
16
|
-
"file": "aib.2.8.0-beta.2203-02.min.js",
|
|
17
|
-
"type": "text/javascript; charset=utf-8",
|
|
18
|
-
"integrity": "sha256-paOqvLRc9AgzcyFwZOqTO4H2qFhCmrnLAuPjOoSyaJA= sha384-vxCQFW7eaF9SuU2n1gsUIgZ7X8D/zGr8kJDABixhxooRogzV0s4g2P4TwsQUraUd sha512-UN91wRxjdRvmzFyx3sG8te8pKsxhkNumyc96LwOMdzXc9EEMh/wAREKJNFzRqyIq4s0YJWHb3Lkm/UrSbC50JQ==",
|
|
19
|
-
"hashes": {
|
|
20
|
-
"sha256": "paOqvLRc9AgzcyFwZOqTO4H2qFhCmrnLAuPjOoSyaJA=",
|
|
21
|
-
"sha384": "vxCQFW7eaF9SuU2n1gsUIgZ7X8D/zGr8kJDABixhxooRogzV0s4g2P4TwsQUraUd",
|
|
22
|
-
"sha512": "UN91wRxjdRvmzFyx3sG8te8pKsxhkNumyc96LwOMdzXc9EEMh/wAREKJNFzRqyIq4s0YJWHb3Lkm/UrSbC50JQ=="
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|