@microsoft/applicationinsights-core-js 2.8.0-beta.2203-01 → 2.8.0-beta.2203-02
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/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +945 -479
- package/browser/applicationinsights-core-js.js.map +1 -1
- package/browser/applicationinsights-core-js.min.js +2 -2
- package/browser/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.api.json +3904 -877
- package/dist/applicationinsights-core-js.api.md +264 -30
- package/dist/applicationinsights-core-js.d.ts +410 -89
- package/dist/applicationinsights-core-js.js +945 -479
- package/dist/applicationinsights-core-js.js.map +1 -1
- package/dist/applicationinsights-core-js.min.js +2 -2
- package/dist/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.rollup.d.ts +410 -89
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +66 -23
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +44 -5
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +105 -73
- package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
- package/dist-esm/JavaScriptSDK/Constants.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +3 -4
- package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +6 -122
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +93 -0
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -0
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +12 -12
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +8 -7
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +472 -0
- package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -0
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +32 -59
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +28 -0
- package/dist-esm/JavaScriptSDK/InternalConstants.js.map +1 -0
- package/dist-esm/JavaScriptSDK/NotificationManager.js +8 -11
- package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +184 -110
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +3 -2
- package/dist-esm/JavaScriptSDK/RandomHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +32 -13
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +4 -6
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +90 -96
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +8 -0
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js.map +1 -0
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -2
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +8 -0
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js.map +1 -0
- package/dist-esm/applicationinsights-core-js.js +8 -4
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +1 -1
- package/src/JavaScriptSDK/BaseCore.ts +80 -24
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +76 -5
- package/src/JavaScriptSDK/ChannelController.ts +107 -61
- package/src/JavaScriptSDK/CookieMgr.ts +4 -4
- package/src/JavaScriptSDK/CoreUtils.ts +6 -143
- package/src/JavaScriptSDK/DataCacheHelper.ts +106 -0
- package/src/JavaScriptSDK/DiagnosticLogger.ts +12 -11
- package/src/JavaScriptSDK/EnvUtils.ts +7 -6
- package/src/JavaScriptSDK/EventHelpers.ts +542 -0
- package/src/JavaScriptSDK/HelperFuncs.ts +35 -54
- package/src/JavaScriptSDK/InternalConstants.ts +26 -0
- package/src/JavaScriptSDK/NotificationManager.ts +7 -11
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +237 -124
- package/src/JavaScriptSDK/RandomHelper.ts +2 -1
- package/src/JavaScriptSDK/TelemetryHelpers.ts +47 -15
- package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +5 -15
- package/src/JavaScriptSDK.Enums/LoggingEnums.ts +184 -87
- package/src/JavaScriptSDK.Enums/TelemetryUnloadReason.ts +27 -0
- package/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts +20 -0
- package/src/JavaScriptSDK.Interfaces/IChannelControls.ts +9 -2
- package/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts +55 -16
- package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +16 -9
- package/src/JavaScriptSDK.Interfaces/ITelemetryPluginChain.ts +9 -11
- package/src/JavaScriptSDK.Interfaces/ITelemetryUnloadState.ts +10 -0
- package/types/JavaScriptSDK/BaseCore.d.ts +4 -0
- package/types/JavaScriptSDK/BaseTelemetryPlugin.d.ts +20 -1
- package/types/JavaScriptSDK/ChannelController.d.ts +4 -0
- package/types/JavaScriptSDK/CoreUtils.d.ts +1 -42
- package/types/JavaScriptSDK/DataCacheHelper.d.ts +13 -0
- package/types/JavaScriptSDK/EventHelpers.d.ts +152 -0
- package/types/JavaScriptSDK/HelperFuncs.d.ts +8 -17
- package/types/JavaScriptSDK/InternalConstants.d.ts +20 -0
- package/types/JavaScriptSDK/ProcessTelemetryContext.d.ts +10 -3
- package/types/JavaScriptSDK/TelemetryHelpers.d.ts +8 -0
- package/types/JavaScriptSDK/TelemetryInitializerPlugin.d.ts +0 -7
- package/types/JavaScriptSDK.Enums/LoggingEnums.d.ts +91 -2
- package/types/JavaScriptSDK.Enums/TelemetryUnloadReason.d.ts +9 -0
- package/types/JavaScriptSDK.Interfaces/IAppInsightsCore.d.ts +17 -0
- package/types/JavaScriptSDK.Interfaces/IChannelControls.d.ts +9 -2
- package/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext.d.ts +49 -14
- package/types/JavaScriptSDK.Interfaces/ITelemetryPlugin.d.ts +15 -8
- package/types/JavaScriptSDK.Interfaces/ITelemetryPluginChain.d.ts +9 -10
- package/types/JavaScriptSDK.Interfaces/ITelemetryUnloadState.d.ts +6 -0
- package/types/applicationinsights-core-js.d.ts +6 -3
|
@@ -11,6 +11,19 @@ import { ICookieMgr } from "./ICookieMgr";
|
|
|
11
11
|
import { ITelemetryInitializerHandler, TelemetryInitializerFunction } from "./ITelemetryInitializers";
|
|
12
12
|
export interface ILoadedPlugin<T extends IPlugin> {
|
|
13
13
|
plugin: T;
|
|
14
|
+
/**
|
|
15
|
+
* Identifies whether the plugin is enabled and can process events. This is slightly different from isInitialized as the plugin may be initialized but disabled
|
|
16
|
+
* via the setEnabled() or it may be a shared plugin which has had it's teardown function called from another instance..
|
|
17
|
+
* @returns boolean = true if the plugin is in a state where it is operational.
|
|
18
|
+
*/
|
|
19
|
+
isEnabled: () => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* You can optionally enable / disable a plugin from processing events.
|
|
22
|
+
* Setting enabled to true will not necessarily cause the `isEnabled()` to also return true
|
|
23
|
+
* as the plugin must also have been successfully initialized and not had it's `teardown` method called
|
|
24
|
+
* (unless it's also been re-initialized)
|
|
25
|
+
*/
|
|
26
|
+
setEnabled: (isEnabled: boolean) => void;
|
|
14
27
|
}
|
|
15
28
|
export interface IAppInsightsCore extends IPerfManagerProvider {
|
|
16
29
|
config: IConfiguration;
|
|
@@ -64,4 +77,8 @@ export interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
64
77
|
* @param pluginIdentifier
|
|
65
78
|
*/
|
|
66
79
|
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
80
|
+
/**
|
|
81
|
+
* Returns the unique event namespace that should be used when registering events
|
|
82
|
+
*/
|
|
83
|
+
evtNamespace(): string;
|
|
67
84
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { SendRequestReason } from "../JavaScriptSDK.Enums/SendRequestReason";
|
|
2
|
+
import { IProcessTelemetryUnloadContext } from "./IProcessTelemetryContext";
|
|
2
3
|
import { ITelemetryPlugin } from "./ITelemetryPlugin";
|
|
4
|
+
import { ITelemetryUnloadState } from "./ITelemetryUnloadState";
|
|
3
5
|
/**
|
|
4
6
|
* Provides data transmission capabilities
|
|
5
7
|
*/
|
|
@@ -13,9 +15,14 @@ export interface IChannelControls extends ITelemetryPlugin {
|
|
|
13
15
|
*/
|
|
14
16
|
resume(): void;
|
|
15
17
|
/**
|
|
16
|
-
* Tear down
|
|
18
|
+
* Tear down the plugin and remove any hooked value, the plugin should be removed so that it is no longer initialized and
|
|
19
|
+
* therefore could be re-initialized after being torn down. The plugin should ensure that once this has been called any further
|
|
20
|
+
* processTelemetry calls are ignored and it just calls the processNext() with the provided context.
|
|
21
|
+
* @param unloadCtx - This is the context that should be used during unloading.
|
|
22
|
+
* @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
|
|
23
|
+
* @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
|
|
17
24
|
*/
|
|
18
|
-
teardown()
|
|
25
|
+
teardown: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
|
|
19
26
|
/**
|
|
20
27
|
* Flush to send data immediately; channel should default to sending data asynchronously
|
|
21
28
|
* @param async - send data asynchronously when true
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { IAppInsightsCore } from "./IAppInsightsCore";
|
|
2
|
-
import { IDiagnosticLogger } from "./IDiagnosticLogger";
|
|
3
2
|
import { IConfiguration } from "./IConfiguration";
|
|
3
|
+
import { IDiagnosticLogger } from "./IDiagnosticLogger";
|
|
4
4
|
import { ITelemetryItem } from "./ITelemetryItem";
|
|
5
5
|
import { IPlugin, ITelemetryPlugin } from "./ITelemetryPlugin";
|
|
6
6
|
import { ITelemetryPluginChain } from "./ITelemetryPluginChain";
|
|
7
|
+
import { ITelemetryUnloadState } from "./ITelemetryUnloadState";
|
|
7
8
|
export declare const enum GetExtCfgMergeType {
|
|
8
9
|
None = 0,
|
|
9
10
|
MergeDefaultOnly = 1,
|
|
10
11
|
MergeDefaultFromRootOrDefault = 2
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
* The current context for the current call to processTelemetry(), used to support sharing the same plugin instance
|
|
14
|
-
* between multiple AppInsights instances
|
|
15
|
-
*/
|
|
16
|
-
export interface IProcessTelemetryContext {
|
|
13
|
+
export interface IBaseProcessingContext {
|
|
17
14
|
/**
|
|
18
15
|
* The current core instance for the request
|
|
19
16
|
*/
|
|
@@ -51,11 +48,6 @@ export interface IProcessTelemetryContext {
|
|
|
51
48
|
* Helper to set the next plugin proxy
|
|
52
49
|
*/
|
|
53
50
|
setNext: (nextCtx: ITelemetryPluginChain) => void;
|
|
54
|
-
/**
|
|
55
|
-
* Call back for telemetry processing before it it is sent
|
|
56
|
-
* @param env - This is the current event being reported
|
|
57
|
-
*/
|
|
58
|
-
processNext: (env: ITelemetryItem) => void;
|
|
59
51
|
/**
|
|
60
52
|
* Synchronously iterate over the context chain running the callback for each plugin, once
|
|
61
53
|
* every plugin has been executed via the callback, any associated onComplete will be called.
|
|
@@ -63,15 +55,58 @@ export interface IProcessTelemetryContext {
|
|
|
63
55
|
*/
|
|
64
56
|
iterate: <T extends ITelemetryPlugin = ITelemetryPlugin>(callback: (plugin: T) => void) => void;
|
|
65
57
|
/**
|
|
66
|
-
*
|
|
58
|
+
* Set the function to call when the current chain has executed all processNext or unloadNext items.
|
|
59
|
+
* @param onComplete - The onComplete to call
|
|
60
|
+
* @param that - The "this" value to use for the onComplete call, if not provided or undefined defaults to the current context
|
|
61
|
+
* @param args - Any additional arguments to pass to the onComplete function
|
|
62
|
+
*/
|
|
63
|
+
onComplete: (onComplete: Function, that?: any, ...args: any[]) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Create a new context using the core and config from the current instance, returns a new instance of the same type
|
|
66
|
+
* @param plugins - The execution order to process the plugins, if null or not supplied
|
|
67
|
+
* then the current execution order will be copied.
|
|
68
|
+
* @param startAt - The plugin to start processing from, if missing from the execution
|
|
69
|
+
* order then the next plugin will be NOT set.
|
|
70
|
+
*/
|
|
71
|
+
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IBaseProcessingContext;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The current context for the current call to processTelemetry(), used to support sharing the same plugin instance
|
|
75
|
+
* between multiple AppInsights instances
|
|
76
|
+
*/
|
|
77
|
+
export interface IProcessTelemetryContext extends IBaseProcessingContext {
|
|
78
|
+
/**
|
|
79
|
+
* Call back for telemetry processing before it it is sent
|
|
80
|
+
* @param env - This is the current event being reported
|
|
81
|
+
* @returns boolean (true) if there is no more plugins to process otherwise false or undefined (void)
|
|
82
|
+
*/
|
|
83
|
+
processNext: (env: ITelemetryItem) => boolean | void;
|
|
84
|
+
/**
|
|
85
|
+
* Create a new context using the core and config from the current instance, returns a new instance of the same type
|
|
67
86
|
* @param plugins - The execution order to process the plugins, if null or not supplied
|
|
68
87
|
* then the current execution order will be copied.
|
|
69
88
|
* @param startAt - The plugin to start processing from, if missing from the execution
|
|
70
89
|
* order then the next plugin will be NOT set.
|
|
71
90
|
*/
|
|
72
91
|
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryContext;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The current context for the current call to processTelemetry(), used to support sharing the same plugin instance
|
|
95
|
+
* between multiple AppInsights instances
|
|
96
|
+
*/
|
|
97
|
+
export interface IProcessTelemetryUnloadContext extends IBaseProcessingContext {
|
|
73
98
|
/**
|
|
74
|
-
*
|
|
99
|
+
* This Plugin has finished unloading, so unload the next one
|
|
100
|
+
* @param uploadState - The state of the unload process
|
|
101
|
+
* @returns boolean (true) if there is no more plugins to process otherwise false or undefined (void)
|
|
102
|
+
*/
|
|
103
|
+
processNext: (unloadState: ITelemetryUnloadState) => boolean | void;
|
|
104
|
+
/**
|
|
105
|
+
* Create a new context using the core and config from the current instance, returns a new instance of the same type
|
|
106
|
+
* @param plugins - The execution order to process the plugins, if null or not supplied
|
|
107
|
+
* then the current execution order will be copied.
|
|
108
|
+
* @param startAt - The plugin to start processing from, if missing from the execution
|
|
109
|
+
* order then the next plugin will be NOT set.
|
|
75
110
|
*/
|
|
76
|
-
|
|
111
|
+
createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryUnloadContext;
|
|
77
112
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ITelemetryItem } from "./ITelemetryItem";
|
|
2
2
|
import { IConfiguration } from "./IConfiguration";
|
|
3
3
|
import { IAppInsightsCore } from "./IAppInsightsCore";
|
|
4
|
-
import { IProcessTelemetryContext } from "./IProcessTelemetryContext";
|
|
4
|
+
import { IProcessTelemetryContext, IProcessTelemetryUnloadContext } from "./IProcessTelemetryContext";
|
|
5
5
|
import { ITelemetryPluginChain } from "./ITelemetryPluginChain";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
export interface ITelemetryPlugin extends IPlugin {
|
|
6
|
+
import { ITelemetryUnloadState } from "./ITelemetryUnloadState";
|
|
7
|
+
export interface ITelemetryProcessor {
|
|
10
8
|
/**
|
|
11
9
|
* Call back for telemetry processing before it it is sent
|
|
12
10
|
* @param env - This is the current event being reported
|
|
@@ -15,6 +13,11 @@ export interface ITelemetryPlugin extends IPlugin {
|
|
|
15
13
|
* to later plugins (vs appending items to the telemetry item)
|
|
16
14
|
*/
|
|
17
15
|
processTelemetry: (env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Configuration provided to SDK core
|
|
19
|
+
*/
|
|
20
|
+
export interface ITelemetryPlugin extends ITelemetryProcessor, IPlugin {
|
|
18
21
|
/**
|
|
19
22
|
* Set next extension for telemetry processing, this is not optional as plugins should use the
|
|
20
23
|
* processNext() function of the passed IProcessTelemetryContext instead. It is being kept for
|
|
@@ -42,10 +45,14 @@ export interface IPlugin {
|
|
|
42
45
|
*/
|
|
43
46
|
isInitialized?: () => boolean;
|
|
44
47
|
/**
|
|
45
|
-
* Tear down the plugin and remove any hooked value, the plugin should
|
|
46
|
-
* therefore
|
|
48
|
+
* Tear down the plugin and remove any hooked value, the plugin should be removed so that it is no longer initialized and
|
|
49
|
+
* therefore could be re-initialized after being torn down. The plugin should ensure that once this has been called any further
|
|
50
|
+
* processTelemetry calls are ignored and it just calls the processNext() with the provided context.
|
|
51
|
+
* @param unloadCtx - This is the context that should be used during unloading.
|
|
52
|
+
* @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
|
|
53
|
+
* @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
|
|
47
54
|
*/
|
|
48
|
-
teardown?: () => void;
|
|
55
|
+
teardown?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
|
|
49
56
|
/**
|
|
50
57
|
* Extension name
|
|
51
58
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { IProcessTelemetryUnloadContext } from "./IProcessTelemetryContext";
|
|
2
|
+
import { ITelemetryPlugin, ITelemetryProcessor } from "./ITelemetryPlugin";
|
|
3
|
+
import { ITelemetryUnloadState } from "./ITelemetryUnloadState";
|
|
4
4
|
/**
|
|
5
5
|
* Configuration provided to SDK core
|
|
6
6
|
*/
|
|
7
|
-
export interface ITelemetryPluginChain {
|
|
7
|
+
export interface ITelemetryPluginChain extends ITelemetryProcessor {
|
|
8
8
|
/**
|
|
9
9
|
* Returns the underlying plugin that is being proxied for the processTelemetry call
|
|
10
10
|
*/
|
|
@@ -14,11 +14,10 @@ export interface ITelemetryPluginChain {
|
|
|
14
14
|
*/
|
|
15
15
|
getNext: () => ITelemetryPluginChain;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @param
|
|
20
|
-
*
|
|
21
|
-
* to later plugins (vs appending items to the telemetry item)
|
|
17
|
+
* This plugin is being unloaded and should remove any hooked events and cleanup any global/scoped values, after this
|
|
18
|
+
* call the plugin will be removed from the telemetry processing chain and will no longer receive any events..
|
|
19
|
+
* @param unloadCtx - The unload context to use for this call.
|
|
20
|
+
* @param unloadState - The details of the unload operation
|
|
22
21
|
*/
|
|
23
|
-
|
|
22
|
+
unload?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
24
23
|
}
|
|
@@ -14,8 +14,9 @@ export { AppInsightsCore } from "./JavaScriptSDK/AppInsightsCore";
|
|
|
14
14
|
export { BaseCore } from "./JavaScriptSDK/BaseCore";
|
|
15
15
|
export { BaseTelemetryPlugin } from "./JavaScriptSDK/BaseTelemetryPlugin";
|
|
16
16
|
export { randomValue, random32, mwcRandomSeed, mwcRandom32, newId } from "./JavaScriptSDK/RandomHelper";
|
|
17
|
-
export { CoreUtils, ICoreUtils, EventHelper, IEventHelper, Undefined,
|
|
18
|
-
export { isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction,
|
|
17
|
+
export { CoreUtils, ICoreUtils, EventHelper, IEventHelper, Undefined, newGuid, perfNow, generateW3CId, disableCookies, canUseCookies, getCookie, setCookie, deleteCookie, _legacyCookieMgr } from "./JavaScriptSDK/CoreUtils";
|
|
18
|
+
export { isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, normalizeJsName, objForEachKey, strEndsWith, strStartsWith, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, strTrim, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, strContains, isSymbol, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objFreeze, objSeal, createEnumStyle, objExtend } from "./JavaScriptSDK/HelperFuncs";
|
|
19
|
+
export { attachEvent, detachEvent, addEventHandler, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, eventOn, eventOff, mergeEvtNamespace, _IRegisteredEvents, __getRegisteredEvents } from "./JavaScriptSDK/EventHelpers";
|
|
19
20
|
export { getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto, hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, dumpObj, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported } from "./JavaScriptSDK/EnvUtils";
|
|
20
21
|
export { getGlobal, objCreateFn as objCreate, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from "@microsoft/applicationinsights-shims";
|
|
21
22
|
export { NotificationManager } from "./JavaScriptSDK/NotificationManager";
|
|
@@ -26,7 +27,7 @@ export { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from "./
|
|
|
26
27
|
export { safeGetLogger, DiagnosticLogger, _InternalLogMessage } from "./JavaScriptSDK/DiagnosticLogger";
|
|
27
28
|
export { ProcessTelemetryContext, createProcessTelemetryContext } from "./JavaScriptSDK/ProcessTelemetryContext";
|
|
28
29
|
export { initializePlugins, sortPlugins } from "./JavaScriptSDK/TelemetryHelpers";
|
|
29
|
-
export { _InternalMessageId, LoggingSeverity } from "./JavaScriptSDK.Enums/LoggingEnums";
|
|
30
|
+
export { _InternalMessageId, _eInternalMessageId, LoggingSeverity, eLoggingSeverity } from "./JavaScriptSDK.Enums/LoggingEnums";
|
|
30
31
|
export { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs } from "./JavaScriptSDK/InstrumentHooks";
|
|
31
32
|
export { ICookieMgr, ICookieMgrConfig } from "./JavaScriptSDK.Interfaces/ICookieMgr";
|
|
32
33
|
export { createCookieMgr, safeGetCookieMgr, uaDisallowsSameSiteNone, areCookiesSupported } from "./JavaScriptSDK/CookieMgr";
|
|
@@ -34,3 +35,5 @@ export { strIKey, strExtensionConfig } from "./JavaScriptSDK/Constants";
|
|
|
34
35
|
export { IDbgExtension } from "./JavaScriptSDK.Interfaces/IDbgExtension";
|
|
35
36
|
export { getDebugListener, getDebugExt } from "./JavaScriptSDK/DbgExtensionUtils";
|
|
36
37
|
export { TelemetryInitializerFunction, ITelemetryInitializerHandler, ITelemetryInitializerContainer } from "./JavaScriptSDK.Interfaces/ITelemetryInitializers";
|
|
38
|
+
export { createUniqueNamespace } from "./JavaScriptSDK/DataCacheHelper";
|
|
39
|
+
export { ITelemetryUnloadState } from "./JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|