@microsoft/applicationinsights-core-js 3.0.0-beta.2209-03 → 3.0.0-beta.2210-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 +1249 -675
- 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 +3669 -1713
- package/dist/applicationinsights-core-js.api.md +131 -54
- package/dist/applicationinsights-core-js.d.ts +332 -131
- package/dist/applicationinsights-core-js.js +1249 -675
- 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 +332 -131
- package/dist-esm/Config/ConfigDefaults.js +114 -0
- package/dist-esm/Config/ConfigDefaults.js.map +1 -0
- package/dist-esm/Config/DynamicConfig.js +129 -0
- package/dist-esm/Config/DynamicConfig.js.map +1 -0
- package/dist-esm/Config/DynamicProperty.js +139 -0
- package/dist-esm/Config/DynamicProperty.js.map +1 -0
- package/dist-esm/Config/DynamicState.js +109 -0
- package/dist-esm/Config/DynamicState.js.map +1 -0
- package/dist-esm/Config/DynamicSupport.js +57 -0
- package/dist-esm/Config/DynamicSupport.js.map +1 -0
- package/dist-esm/Config/IConfigDefaults.js +8 -0
- package/dist-esm/Config/IConfigDefaults.js.map +1 -0
- package/dist-esm/Config/IDynamicConfigHandler.js +8 -0
- package/dist-esm/Config/IDynamicConfigHandler.js.map +1 -0
- package/dist-esm/Config/IDynamicPropertyHandler.js +8 -0
- package/dist-esm/Config/IDynamicPropertyHandler.js.map +1 -0
- package/dist-esm/Config/IDynamicWatcher.js +8 -0
- package/dist-esm/Config/IDynamicWatcher.js.map +1 -0
- package/dist-esm/Config/_IDynamicConfigHandlerState.js +6 -0
- package/dist-esm/Config/_IDynamicConfigHandlerState.js.map +1 -0
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +808 -23
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +22 -18
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +78 -38
- package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +6 -5
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +10 -8
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +40 -23
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -115
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +30 -29
- package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +19 -34
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +5 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js.map +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +18 -11
- package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +2 -3
- package/dist-esm/JavaScriptSDK/PerfManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +62 -53
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +8 -10
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +3 -4
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +12 -10
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -2
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +2 -107
- 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 +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
- 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/IDistributedTraceContext.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 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadHook.js +8 -0
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadHook.js.map +1 -0
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +3 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js.map +1 -1
- package/dist-esm/__DynamicConstants.js +26 -23
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +6 -4
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +2 -2
- package/src/JavaScriptSDK/AppInsightsCore.ts +1156 -16
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +25 -17
- package/src/JavaScriptSDK/CookieMgr.ts +88 -41
- package/src/JavaScriptSDK/CoreUtils.ts +4 -3
- package/src/JavaScriptSDK/DiagnosticLogger.ts +51 -29
- package/src/JavaScriptSDK/EnvUtils.ts +0 -133
- package/src/JavaScriptSDK/EventHelpers.ts +29 -28
- package/src/JavaScriptSDK/HelperFuncs.ts +22 -39
- package/src/JavaScriptSDK/InternalConstants.ts +5 -0
- package/src/JavaScriptSDK/NotificationManager.ts +25 -14
- package/src/JavaScriptSDK/PerfManager.ts +2 -2
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +73 -56
- package/src/JavaScriptSDK/TelemetryHelpers.ts +8 -9
- package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +2 -2
- package/src/JavaScriptSDK/W3cTraceParent.ts +7 -6
- package/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts +0 -1
- package/src/JavaScriptSDK.Enums/LoggingEnums.ts +9 -108
- package/src/JavaScriptSDK.Enums/TelemetryUpdateReason.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts +28 -3
- package/src/JavaScriptSDK.Interfaces/ICookieMgr.ts +8 -0
- package/src/JavaScriptSDK.Interfaces/IDiagnosticLogger.ts +15 -8
- package/src/JavaScriptSDK.Interfaces/IInstrumentHooks.ts +3 -1
- package/src/JavaScriptSDK.Interfaces/INotificationListener.ts +5 -5
- package/src/JavaScriptSDK.Interfaces/INotificationManager.ts +8 -8
- package/src/JavaScriptSDK.Interfaces/IPerfManager.ts +3 -3
- package/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts +10 -9
- package/src/JavaScriptSDK.Interfaces/ITelemetryInitializers.ts +2 -1
- package/src/JavaScriptSDK.Interfaces/ITelemetryUpdateState.ts +15 -5
- package/src/JavaScriptSDK.Interfaces/IUnloadHook.ts +22 -0
- package/src/JavaScriptSDK.Interfaces/IUnloadableComponent.ts +3 -3
- package/tsconfig.json +3 -2
- package/types/Config/ConfigDefaults.d.ts +10 -0
- package/types/Config/DynamicConfig.d.ts +23 -0
- package/types/Config/DynamicProperty.d.ts +3 -0
- package/types/Config/DynamicState.d.ts +3 -0
- package/types/Config/DynamicSupport.d.ts +15 -0
- package/types/Config/IConfigDefaults.d.ts +42 -0
- package/types/Config/IDynamicConfigHandler.d.ts +46 -0
- package/types/Config/IDynamicPropertyHandler.d.ts +11 -0
- package/types/Config/IDynamicWatcher.d.ts +28 -0
- package/types/Config/_IDynamicConfigHandlerState.d.ts +35 -0
- package/types/JavaScriptSDK/AppInsightsCore.d.ts +136 -4
- package/types/JavaScriptSDK/BaseTelemetryPlugin.d.ts +2 -2
- package/types/JavaScriptSDK/CookieMgr.d.ts +0 -10
- package/types/JavaScriptSDK/DiagnosticLogger.d.ts +18 -16
- package/types/JavaScriptSDK/EventHelpers.d.ts +24 -24
- package/types/JavaScriptSDK/HelperFuncs.d.ts +13 -11
- package/types/JavaScriptSDK/InternalConstants.d.ts +4 -0
- package/types/JavaScriptSDK/NotificationManager.d.ts +7 -7
- package/types/JavaScriptSDK/PerfManager.d.ts +2 -2
- package/types/JavaScriptSDK/ProcessTelemetryContext.d.ts +3 -2
- package/types/JavaScriptSDK/TelemetryHelpers.d.ts +3 -3
- package/types/JavaScriptSDK.Enums/LoggingEnums.d.ts +7 -5
- package/types/JavaScriptSDK.Enums/TelemetryUpdateReason.d.ts +1 -0
- package/types/JavaScriptSDK.Interfaces/IAppInsightsCore.d.ts +25 -3
- package/types/JavaScriptSDK.Interfaces/ICookieMgr.d.ts +6 -0
- package/types/JavaScriptSDK.Interfaces/IDiagnosticLogger.d.ts +14 -8
- package/types/JavaScriptSDK.Interfaces/IInstrumentHooks.d.ts +2 -1
- package/types/JavaScriptSDK.Interfaces/INotificationListener.d.ts +5 -5
- package/types/JavaScriptSDK.Interfaces/INotificationManager.d.ts +8 -8
- package/types/JavaScriptSDK.Interfaces/IPerfManager.d.ts +3 -3
- package/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext.d.ts +5 -9
- package/types/JavaScriptSDK.Interfaces/ITelemetryInitializers.d.ts +2 -1
- package/types/JavaScriptSDK.Interfaces/ITelemetryUpdateState.d.ts +13 -2
- package/types/JavaScriptSDK.Interfaces/IUnloadHook.d.ts +18 -0
- package/types/__DynamicConstants.d.ts +18 -15
- package/types/applicationinsights-core-js.d.ts +11 -4
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +0 -654
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +0 -1
- package/src/JavaScriptSDK/BaseCore.ts +0 -948
- package/types/JavaScriptSDK/BaseCore.d.ts +0 -124
|
@@ -1,12 +1,144 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WatcherFunction } from "../Config/IDynamicWatcher";
|
|
2
|
+
import { SendRequestReason } from "../JavaScriptSDK.Enums/SendRequestReason";
|
|
3
|
+
import { IAppInsightsCore, ILoadedPlugin } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
4
|
+
import { IChannelControls } from "../JavaScriptSDK.Interfaces/IChannelControls";
|
|
2
5
|
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
6
|
+
import { ICookieMgr } from "../JavaScriptSDK.Interfaces/ICookieMgr";
|
|
3
7
|
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
8
|
+
import { IDistributedTraceContext } from "../JavaScriptSDK.Interfaces/IDistributedTraceContext";
|
|
9
|
+
import { INotificationListener } from "../JavaScriptSDK.Interfaces/INotificationListener";
|
|
4
10
|
import { INotificationManager } from "../JavaScriptSDK.Interfaces/INotificationManager";
|
|
11
|
+
import { IPerfManager } from "../JavaScriptSDK.Interfaces/IPerfManager";
|
|
12
|
+
import { IProcessTelemetryContext, IProcessTelemetryUpdateContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
13
|
+
import { ITelemetryInitializerHandler, TelemetryInitializerFunction } from "../JavaScriptSDK.Interfaces/ITelemetryInitializers";
|
|
5
14
|
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
6
|
-
import { IPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
7
|
-
import {
|
|
8
|
-
|
|
15
|
+
import { IPlugin, ITelemetryPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
16
|
+
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
17
|
+
import { ITelemetryUpdateState } from "../JavaScriptSDK.Interfaces/ITelemetryUpdateState";
|
|
18
|
+
import { ILegacyUnloadHook, IUnloadHook } from "../JavaScriptSDK.Interfaces/IUnloadHook";
|
|
19
|
+
import { UnloadHandler } from "./UnloadHandlerContainer";
|
|
20
|
+
export declare class AppInsightsCore implements IAppInsightsCore {
|
|
21
|
+
static defaultConfig: IConfiguration;
|
|
22
|
+
config: IConfiguration;
|
|
23
|
+
logger: IDiagnosticLogger;
|
|
24
|
+
_extensions: IPlugin[];
|
|
25
|
+
isInitialized: () => boolean;
|
|
9
26
|
constructor();
|
|
10
27
|
initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
|
|
28
|
+
getTransmissionControls(): IChannelControls[][];
|
|
11
29
|
track(telemetryItem: ITelemetryItem): void;
|
|
30
|
+
getProcessTelContext(): IProcessTelemetryContext;
|
|
31
|
+
getNotifyMgr(): INotificationManager;
|
|
32
|
+
/**
|
|
33
|
+
* Adds a notification listener. The SDK calls methods on the listener when an appropriate notification is raised.
|
|
34
|
+
* The added plugins must raise notifications. If the plugins do not implement the notifications, then no methods will be
|
|
35
|
+
* called.
|
|
36
|
+
* @param listener - An INotificationListener object.
|
|
37
|
+
*/
|
|
38
|
+
addNotificationListener(listener: INotificationListener): void;
|
|
39
|
+
/**
|
|
40
|
+
* Removes all instances of the listener.
|
|
41
|
+
* @param listener - INotificationListener to remove.
|
|
42
|
+
*/
|
|
43
|
+
removeNotificationListener(listener: INotificationListener): void;
|
|
44
|
+
/**
|
|
45
|
+
* Get the current cookie manager for this instance
|
|
46
|
+
*/
|
|
47
|
+
getCookieMgr(): ICookieMgr;
|
|
48
|
+
/**
|
|
49
|
+
* Set the current cookie manager for this instance
|
|
50
|
+
* @param cookieMgr - The manager, if set to null/undefined will cause the default to be created
|
|
51
|
+
*/
|
|
52
|
+
setCookieMgr(cookieMgr: ICookieMgr): void;
|
|
53
|
+
getPerfMgr(): IPerfManager;
|
|
54
|
+
setPerfMgr(perfMgr: IPerfManager): void;
|
|
55
|
+
eventCnt(): number;
|
|
56
|
+
/**
|
|
57
|
+
* Periodically check logger.queue for
|
|
58
|
+
*/
|
|
59
|
+
pollInternalLogs(eventName?: string): number;
|
|
60
|
+
/**
|
|
61
|
+
* Periodically check logger.queue for
|
|
62
|
+
*/
|
|
63
|
+
stopPollingInternalLogs(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Add a telemetry processor to decorate or drop telemetry events.
|
|
66
|
+
* @param telemetryInitializer - The Telemetry Initializer function
|
|
67
|
+
* @returns - A ITelemetryInitializerHandler to enable the initializer to be removed
|
|
68
|
+
*/
|
|
69
|
+
addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler;
|
|
70
|
+
/**
|
|
71
|
+
* Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered
|
|
72
|
+
* to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous
|
|
73
|
+
* unload call return `true` stating that all plugins reported that they also unloaded, the recommended
|
|
74
|
+
* approach is to create a new instance and initialize that instance.
|
|
75
|
+
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
76
|
+
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
77
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
78
|
+
* @param unloadComplete - An optional callback that will be called once the unload has completed
|
|
79
|
+
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the unload. Defaults to 5 seconds.
|
|
80
|
+
*/
|
|
81
|
+
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void;
|
|
82
|
+
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
83
|
+
/**
|
|
84
|
+
* Add a new plugin to the installation
|
|
85
|
+
* @param plugin - The new plugin to add
|
|
86
|
+
* @param replaceExisting - should any existing plugin be replaced, default is false
|
|
87
|
+
* @param doAsync - Should the add be performed asynchronously
|
|
88
|
+
* @param addCb - [Optional] callback to call after the plugin has been added
|
|
89
|
+
*/
|
|
90
|
+
addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
|
|
91
|
+
/**
|
|
92
|
+
* Update the configuration used and broadcast the changes to all loaded plugins
|
|
93
|
+
* @param newConfig - The new configuration is apply
|
|
94
|
+
* @param mergeExisting - Should the new configuration merge with the existing or just replace it. Default is to true.
|
|
95
|
+
*/
|
|
96
|
+
updateCfg<T extends IConfiguration = IConfiguration>(newConfig: T, mergeExisting?: boolean): void;
|
|
97
|
+
/**
|
|
98
|
+
* Returns the unique event namespace that should be used
|
|
99
|
+
*/
|
|
100
|
+
evtNamespace(): string;
|
|
101
|
+
/**
|
|
102
|
+
* Add an unload handler that will be called when the SDK is being unloaded
|
|
103
|
+
* @param handler - the handler
|
|
104
|
+
*/
|
|
105
|
+
addUnloadCb(handler: UnloadHandler): void;
|
|
106
|
+
/**
|
|
107
|
+
* Flush and send any batched / cached data immediately
|
|
108
|
+
* @param async - send data asynchronously when true (defaults to true)
|
|
109
|
+
* @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.
|
|
110
|
+
* If the caller doesn't return true the caller should assume that it may never be called.
|
|
111
|
+
* @param sendReason - specify the reason that you are calling "flush" defaults to ManualFlush (1) if not specified
|
|
112
|
+
* @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
|
|
113
|
+
*/
|
|
114
|
+
flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): void;
|
|
115
|
+
/**
|
|
116
|
+
* Gets the current distributed trace context for this instance if available
|
|
117
|
+
* @param createNew - Optional flag to create a new instance if one doesn't currently exist, defaults to true
|
|
118
|
+
*/
|
|
119
|
+
getTraceCtx(createNew?: boolean): IDistributedTraceContext | null;
|
|
120
|
+
/**
|
|
121
|
+
* Sets the current distributed trace context for this instance if available
|
|
122
|
+
*/
|
|
123
|
+
setTraceCtx(newTracectx: IDistributedTraceContext): void;
|
|
124
|
+
/**
|
|
125
|
+
* Add this hook so that it is automatically removed during unloading
|
|
126
|
+
* @param hooks - The single hook or an array of IInstrumentHook objects
|
|
127
|
+
*/
|
|
128
|
+
addUnloadHook(hooks: IUnloadHook | IUnloadHook[] | Iterator<IUnloadHook> | ILegacyUnloadHook | ILegacyUnloadHook[] | Iterator<ILegacyUnloadHook>): void;
|
|
129
|
+
/**
|
|
130
|
+
* Watches and tracks changes for accesses to the current config, and if the accessed config changes the
|
|
131
|
+
* handler will be recalled.
|
|
132
|
+
* @param handler
|
|
133
|
+
* @returns A watcher handler instance that can be used to remove itself when being unloaded
|
|
134
|
+
*/
|
|
135
|
+
onCfgChange<T extends IConfiguration = IConfiguration>(handler: WatcherFunction<T>): IUnloadHook;
|
|
136
|
+
protected releaseQueue(): void;
|
|
137
|
+
/**
|
|
138
|
+
* Hook for Core extensions to allow them to update their own configuration before updating all of the plugins.
|
|
139
|
+
* @param updateCtx - The plugin update context
|
|
140
|
+
* @param updateState - The Update State
|
|
141
|
+
* @returns boolean - True means the extension class will call updateState otherwise the Core will
|
|
142
|
+
*/
|
|
143
|
+
protected _updateHook?(updateCtx: IProcessTelemetryUpdateContext, updateState: ITelemetryUpdateState): void | boolean;
|
|
12
144
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
2
2
|
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
3
3
|
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
4
|
-
import { IInstrumentHook } from "../JavaScriptSDK.Interfaces/IInstrumentHooks";
|
|
5
4
|
import { IProcessTelemetryContext, IProcessTelemetryUnloadContext, IProcessTelemetryUpdateContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
6
5
|
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
7
6
|
import { IPlugin, ITelemetryPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
8
7
|
import { ITelemetryPluginChain } from "../JavaScriptSDK.Interfaces/ITelemetryPluginChain";
|
|
9
8
|
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
10
9
|
import { ITelemetryUpdateState } from "../JavaScriptSDK.Interfaces/ITelemetryUpdateState";
|
|
10
|
+
import { ILegacyUnloadHook, IUnloadHook } from "../JavaScriptSDK.Interfaces/IUnloadHook";
|
|
11
11
|
import { UnloadHandler } from "./UnloadHandlerContainer";
|
|
12
12
|
/**
|
|
13
13
|
* BaseTelemetryPlugin provides a basic implementation of the ITelemetryPlugin interface so that plugins
|
|
@@ -99,5 +99,5 @@ export declare abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
|
|
|
99
99
|
* Add this hook so that it is automatically removed during unloading
|
|
100
100
|
* @param hooks - The single hook or an array of IInstrumentHook objects
|
|
101
101
|
*/
|
|
102
|
-
protected _addHook(hooks:
|
|
102
|
+
protected _addHook(hooks: IUnloadHook | IUnloadHook[] | ILegacyUnloadHook | ILegacyUnloadHook[]): void;
|
|
103
103
|
}
|
|
@@ -2,16 +2,6 @@ import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
|
2
2
|
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
3
3
|
import { ICookieMgr } from "../JavaScriptSDK.Interfaces/ICookieMgr";
|
|
4
4
|
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
5
|
-
/**
|
|
6
|
-
* @ignore
|
|
7
|
-
* DO NOT USE or export from the module, this is exposed as public to support backward compatibility of previous static utility methods only.
|
|
8
|
-
* If you want to manager cookies either use the ICookieMgr available from the core instance via getCookieMgr() or create
|
|
9
|
-
* your own instance of the CookieMgr and use that.
|
|
10
|
-
* Using this directly for enabling / disabling cookie handling will not only affect your usage but EVERY user of cookies.
|
|
11
|
-
* Example, if you are using a shared component that is also using Application Insights you will affect their cookie handling.
|
|
12
|
-
* @param logger - The DiagnosticLogger to use for reporting errors.
|
|
13
|
-
*/
|
|
14
|
-
export declare function _gblCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
15
5
|
/**
|
|
16
6
|
* Helper to return the ICookieMgr from the core (if not null/undefined) or a default implementation
|
|
17
7
|
* associated with the configuration or a legacy default.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { LoggingSeverity,
|
|
1
|
+
import { LoggingSeverity, _eInternalMessageId } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
2
2
|
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
3
3
|
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
4
4
|
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
5
|
+
import { ITelemetryUpdateState } from "../JavaScriptSDK.Interfaces/ITelemetryUpdateState";
|
|
5
6
|
export declare class _InternalLogMessage {
|
|
6
7
|
static dataType: string;
|
|
7
8
|
message: string;
|
|
8
|
-
messageId:
|
|
9
|
-
constructor(msgId:
|
|
9
|
+
messageId: _eInternalMessageId;
|
|
10
|
+
constructor(msgId: _eInternalMessageId, msg: string, isUserAct?: boolean, properties?: Object);
|
|
10
11
|
}
|
|
11
12
|
export declare function safeGetLogger(core: IAppInsightsCore, config?: IConfiguration): IDiagnosticLogger;
|
|
12
13
|
export declare class DiagnosticLogger implements IDiagnosticLogger {
|
|
@@ -38,18 +39,18 @@ export declare class DiagnosticLogger implements IDiagnosticLogger {
|
|
|
38
39
|
maxInternalMessageLimit(): number;
|
|
39
40
|
/**
|
|
40
41
|
* This method will throw exceptions in debug mode or attempt to log the error as a console warning.
|
|
41
|
-
* @param severity {LoggingSeverity} - The severity of the log message
|
|
42
|
-
* @param message {_InternalLogMessage} - The log message.
|
|
42
|
+
* @param severity - {LoggingSeverity} - The severity of the log message
|
|
43
|
+
* @param message - {_InternalLogMessage} - The log message.
|
|
43
44
|
*/
|
|
44
|
-
throwInternal(severity: LoggingSeverity, msgId:
|
|
45
|
+
throwInternal(severity: LoggingSeverity, msgId: _eInternalMessageId, msg: string, properties?: Object, isUserAct?: boolean): void;
|
|
45
46
|
/**
|
|
46
47
|
* This will write a warning to the console if possible
|
|
47
|
-
* @param message {string} - The warning message
|
|
48
|
+
* @param message - {string} - The warning message
|
|
48
49
|
*/
|
|
49
50
|
warnToConsole(message: string): void;
|
|
50
51
|
/**
|
|
51
52
|
* This will write an error to the console if possible
|
|
52
|
-
* @param message {string} - The warning message
|
|
53
|
+
* @param message - {string} - The warning message
|
|
53
54
|
*/
|
|
54
55
|
errorToConsole(message: string): void;
|
|
55
56
|
/**
|
|
@@ -58,10 +59,11 @@ export declare class DiagnosticLogger implements IDiagnosticLogger {
|
|
|
58
59
|
resetInternalMessageCount(): void;
|
|
59
60
|
/**
|
|
60
61
|
* Logs a message to the internal queue.
|
|
61
|
-
* @param severity {LoggingSeverity} - The severity of the log message
|
|
62
|
-
* @param message {_InternalLogMessage} - The message to log.
|
|
62
|
+
* @param severity - {LoggingSeverity} - The severity of the log message
|
|
63
|
+
* @param message - {_InternalLogMessage} - The message to log.
|
|
63
64
|
*/
|
|
64
65
|
logInternalMessage(severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
66
|
+
update(updateState: ITelemetryUpdateState): void;
|
|
65
67
|
}
|
|
66
68
|
/**
|
|
67
69
|
* This is a helper method which will call throwInternal on the passed logger, will throw exceptions in
|
|
@@ -69,20 +71,20 @@ export declare class DiagnosticLogger implements IDiagnosticLogger {
|
|
|
69
71
|
* support minification as logger.throwInternal() will not compress the publish "throwInternal" used throughout
|
|
70
72
|
* the code.
|
|
71
73
|
* @param logger - The Diagnostic Logger instance to use.
|
|
72
|
-
* @param severity {LoggingSeverity} - The severity of the log message
|
|
73
|
-
* @param message {_InternalLogMessage} - The log message.
|
|
74
|
+
* @param severity - {LoggingSeverity} - The severity of the log message
|
|
75
|
+
* @param message - {_InternalLogMessage} - The log message.
|
|
74
76
|
*/
|
|
75
|
-
export declare function _throwInternal(logger: IDiagnosticLogger, severity: LoggingSeverity, msgId:
|
|
77
|
+
export declare function _throwInternal(logger: IDiagnosticLogger, severity: LoggingSeverity, msgId: _eInternalMessageId, msg: string, properties?: Object, isUserAct?: boolean): void;
|
|
76
78
|
/**
|
|
77
79
|
* This is a helper method which will call warnToConsole on the passed logger with the provided message.
|
|
78
80
|
* @param logger - The Diagnostic Logger instance to use.
|
|
79
|
-
* @param message {_InternalLogMessage} - The log message.
|
|
81
|
+
* @param message - {_InternalLogMessage} - The log message.
|
|
80
82
|
*/
|
|
81
83
|
export declare function _warnToConsole(logger: IDiagnosticLogger, message: string): void;
|
|
82
84
|
/**
|
|
83
85
|
* Logs a message to the internal queue.
|
|
84
86
|
* @param logger - The Diagnostic Logger instance to use.
|
|
85
|
-
* @param severity {LoggingSeverity} - The severity of the log message
|
|
86
|
-
* @param message {_InternalLogMessage} - The message to log.
|
|
87
|
+
* @param severity - {LoggingSeverity} - The severity of the log message
|
|
88
|
+
* @param message - {_InternalLogMessage} - The message to log.
|
|
87
89
|
*/
|
|
88
90
|
export declare function _logInternalMessage(logger: IDiagnosticLogger, severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
@@ -14,62 +14,62 @@ export declare function __getRegisteredEvents(target: any, eventName?: string, e
|
|
|
14
14
|
export declare function mergeEvtNamespace(theNamespace: string, namespaces?: string | string[] | null): string | string[];
|
|
15
15
|
/**
|
|
16
16
|
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
17
|
-
* @param obj Object to add the event too.
|
|
18
|
-
* @param eventName String that specifies any of the standard DHTML Events without "on" prefix, if may also include an optional (dot "." prefixed)
|
|
17
|
+
* @param obj - Object to add the event too.
|
|
18
|
+
* @param eventName - String that specifies any of the standard DHTML Events without "on" prefix, if may also include an optional (dot "." prefixed)
|
|
19
19
|
* namespaces "click" "click.mynamespace" in addition to specific namespaces.
|
|
20
|
-
* @param handlerRef Pointer that specifies the function to call when event fires
|
|
20
|
+
* @param handlerRef - Pointer that specifies the function to call when event fires
|
|
21
21
|
* @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,
|
|
22
22
|
* if the eventName also includes a namespace the namespace(s) are merged into a single namespace
|
|
23
|
-
* @param useCapture [Optional] Defaults to false
|
|
23
|
+
* @param useCapture - [Optional] Defaults to false
|
|
24
24
|
* @returns True if the function was bound successfully to the event, otherwise false
|
|
25
25
|
*/
|
|
26
26
|
export declare function eventOn<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): boolean;
|
|
27
27
|
/**
|
|
28
28
|
* Removes an event handler for the specified event
|
|
29
|
-
* @param Object to remove the event from
|
|
30
|
-
* @param eventName {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
29
|
+
* @param Object - to remove the event from
|
|
30
|
+
* @param eventName - {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
31
31
|
* such as "click", "click.mynamespace" or ".mynamespace"
|
|
32
|
-
* @param handlerRef {any} - The callback function that needs to be removed from the given event, when using a
|
|
32
|
+
* @param handlerRef - {any} - The callback function that needs to be removed from the given event, when using a
|
|
33
33
|
* namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers
|
|
34
34
|
* otherwise this will only remove events with this specific handler.
|
|
35
35
|
* @param evtNamespace - [Optional] Additional namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace,
|
|
36
36
|
* if the eventName also includes a namespace the namespace(s) are merged into a single namespace
|
|
37
|
-
* @param useCapture [Optional] Defaults to false
|
|
37
|
+
* @param useCapture - [Optional] Defaults to false
|
|
38
38
|
*/
|
|
39
39
|
export declare function eventOff<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): void;
|
|
40
40
|
/**
|
|
41
41
|
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
42
|
-
* @param obj Object to add the event too.
|
|
43
|
-
* @param eventNameWithoutOn String that specifies any of the standard DHTML Events without "on" prefix and optional (dot "." prefixed) namespaces "click" "click.mynamespace".
|
|
44
|
-
* @param handlerRef Pointer that specifies the function to call when event fires
|
|
45
|
-
* @param useCapture [Optional] Defaults to false
|
|
42
|
+
* @param obj - Object to add the event too.
|
|
43
|
+
* @param eventNameWithoutOn - String that specifies any of the standard DHTML Events without "on" prefix and optional (dot "." prefixed) namespaces "click" "click.mynamespace".
|
|
44
|
+
* @param handlerRef - Pointer that specifies the function to call when event fires
|
|
45
|
+
* @param useCapture - [Optional] Defaults to false
|
|
46
46
|
* @returns True if the function was bound successfully to the event, otherwise false
|
|
47
47
|
*/
|
|
48
48
|
export declare function attachEvent(obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture?: boolean): boolean;
|
|
49
49
|
/**
|
|
50
50
|
* Removes an event handler for the specified event
|
|
51
|
-
* @param Object to remove the event from
|
|
52
|
-
* @param eventNameWithoutOn {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
51
|
+
* @param Object - to remove the event from
|
|
52
|
+
* @param eventNameWithoutOn - {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
53
53
|
* such as "click", "click.mynamespace" or ".mynamespace"
|
|
54
|
-
* @param handlerRef {any} - The callback function that needs to be removed from the given event, when using a
|
|
54
|
+
* @param handlerRef - {any} - The callback function that needs to be removed from the given event, when using a
|
|
55
55
|
* namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers
|
|
56
56
|
* otherwise this will only remove events with this specific handler.
|
|
57
|
-
* @param useCapture [Optional] Defaults to false
|
|
57
|
+
* @param useCapture - [Optional] Defaults to false
|
|
58
58
|
*/
|
|
59
59
|
export declare function detachEvent(obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture?: boolean): void;
|
|
60
60
|
/**
|
|
61
61
|
* Trys to add an event handler for the specified event to the window, body and document
|
|
62
|
-
* @param eventName {string} - The name of the event
|
|
63
|
-
* @param callback {any} - The callback function that needs to be executed for the given event
|
|
62
|
+
* @param eventName - {string} - The name of the event
|
|
63
|
+
* @param callback - {any} - The callback function that needs to be executed for the given event
|
|
64
64
|
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
65
65
|
* @return {boolean} - true if the handler was successfully added
|
|
66
66
|
*/
|
|
67
67
|
export declare function addEventHandler(eventName: string, callback: any, evtNamespace?: string | string[] | null): boolean;
|
|
68
68
|
/**
|
|
69
69
|
* Trys to remove event handler(s) for the specified event/namespace to the window, body and document
|
|
70
|
-
* @param eventName {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
70
|
+
* @param eventName - {string} - The name of the event, with optional namespaces or just the namespaces,
|
|
71
71
|
* such as "click", "click.mynamespace" or ".mynamespace"
|
|
72
|
-
* @param callback {any} - - The callback function that needs to be removed from the given event, when using a
|
|
72
|
+
* @param callback - {any} - - The callback function that needs to be removed from the given event, when using a
|
|
73
73
|
* namespace (with or without a qualifying event) this may be null to remove all previously attached event handlers
|
|
74
74
|
* otherwise this will only remove events with this specific handler.
|
|
75
75
|
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
@@ -77,8 +77,8 @@ export declare function addEventHandler(eventName: string, callback: any, evtNam
|
|
|
77
77
|
export declare function removeEventHandler(eventName: string, callback: any, evtNamespace?: string | string[] | null): void;
|
|
78
78
|
/**
|
|
79
79
|
* Bind the listener to the array of events
|
|
80
|
-
* @param events An string array of event names to bind the listener to
|
|
81
|
-
* @param listener The event callback to call when the event is triggered
|
|
80
|
+
* @param events - An string array of event names to bind the listener to
|
|
81
|
+
* @param listener - The event callback to call when the event is triggered
|
|
82
82
|
* @param excludeEvents - [Optional] An array of events that should not be hooked (if possible), unless no other events can be.
|
|
83
83
|
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
84
84
|
* @returns true - when at least one of the events was registered otherwise false
|
|
@@ -86,8 +86,8 @@ export declare function removeEventHandler(eventName: string, callback: any, evt
|
|
|
86
86
|
export declare function addEventListeners(events: string[], listener: any, excludeEvents?: string[], evtNamespace?: string | string[]): boolean;
|
|
87
87
|
/**
|
|
88
88
|
* Remove the listener from the array of events
|
|
89
|
-
* @param events An string array of event names to bind the listener to
|
|
90
|
-
* @param listener The event callback to call when the event is triggered
|
|
89
|
+
* @param events - An string array of event names to bind the listener to
|
|
90
|
+
* @param listener - The event callback to call when the event is triggered
|
|
91
91
|
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
92
92
|
*/
|
|
93
93
|
export declare function removeEventListeners(events: string[], listener: any, evtNamespace?: string | string[]): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare
|
|
1
|
+
import { objForEachKey as objForEachKey21 } from "@nevware21/ts-utils";
|
|
2
|
+
export declare let _getObjProto: (o: any) => any;
|
|
3
3
|
export declare function isNotUndefined<T>(value: T): value is T;
|
|
4
4
|
export declare function isNotNullOrUndefined<T>(value: T): value is T;
|
|
5
5
|
/**
|
|
@@ -7,9 +7,16 @@ export declare function isNotNullOrUndefined<T>(value: T): value is T;
|
|
|
7
7
|
* normalizes the name so that it would. This method does not identify or change any keywords
|
|
8
8
|
* meaning that if you pass in a known keyword the same value will be returned.
|
|
9
9
|
* This is a simplified version
|
|
10
|
-
* @param name The name to validate
|
|
10
|
+
* @param name - The name to validate
|
|
11
11
|
*/
|
|
12
12
|
export declare function normalizeJsName(name: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* This is a helper function for the equivalent of arForEach(objKeys(target), callbackFn), this is a
|
|
15
|
+
* performance optimization to avoid the creation of a new array for large objects
|
|
16
|
+
* @param target - The target object to find and process the keys
|
|
17
|
+
* @param callbackfn - The function to call with the details
|
|
18
|
+
*/
|
|
19
|
+
export declare const objForEachKey: typeof objForEachKey21;
|
|
13
20
|
/**
|
|
14
21
|
* A simple wrapper (for minification support) to check if the value contains the search string.
|
|
15
22
|
* @param value - The string value to check for the existence of the search value
|
|
@@ -24,7 +31,7 @@ export declare function isPlainObject(value: any): boolean;
|
|
|
24
31
|
/**
|
|
25
32
|
* Convert a date to I.S.O. format in IE8
|
|
26
33
|
*/
|
|
27
|
-
export declare function toISOString(date: Date):
|
|
34
|
+
export declare function toISOString(date: Date): string;
|
|
28
35
|
export declare const deepFreeze: <T>(obj: T) => T;
|
|
29
36
|
/**
|
|
30
37
|
* Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)
|
|
@@ -53,12 +60,6 @@ export declare function setValue<T, K extends keyof T>(target: T, field: K, valu
|
|
|
53
60
|
* @param defValue - [Optional] The value to set if not already present, when not provided a empty object will be added
|
|
54
61
|
*/
|
|
55
62
|
export declare function getSetValue<T, K extends keyof T>(target: T, field: K, defValue?: T[K]): T[K];
|
|
56
|
-
/**
|
|
57
|
-
* Get the mapped config value, if null or undefined any supplied defaultValue will be returned.
|
|
58
|
-
* @param field - The name of the field as the named enum value (number) or the string name.
|
|
59
|
-
* @param defaultValue - The default value to return if the config field is not present, null or undefined.
|
|
60
|
-
*/
|
|
61
|
-
export declare function getCfgValue<V>(theValue: V, defaultValue?: V): V;
|
|
62
63
|
/**
|
|
63
64
|
* Effectively assigns all enumerable properties (not just own properties) and functions (including inherited prototype) from
|
|
64
65
|
* the source object to the target, it attempts to use proxy getters / setters (if possible) and proxy functions to avoid potential
|
|
@@ -97,7 +98,7 @@ export declare function proxyFunctions<T, S>(target: T, source: S | (() => S), f
|
|
|
97
98
|
/**
|
|
98
99
|
* Simpler helper to create a dynamic class that implements the interface and populates the values with the defaults.
|
|
99
100
|
* Only instance properties (hasOwnProperty) values are copied from the defaults to the new instance
|
|
100
|
-
* @param defaults Simple helper
|
|
101
|
+
* @param defaults - Simple helper
|
|
101
102
|
*/
|
|
102
103
|
export declare function createClassFromInterface<T>(defaults?: T): new () => T;
|
|
103
104
|
/**
|
|
@@ -120,3 +121,4 @@ export declare function optimizeObject<T>(theObject: T): T;
|
|
|
120
121
|
*/
|
|
121
122
|
export declare function objExtend<T2, T3, T4, T5, T6>(deepExtend?: boolean, obj2?: T2, obj3?: T3, obj4?: T4, obj5?: T5, obj6?: T6): T2 & T3 & T4 & T5 & T6;
|
|
122
123
|
export declare function objExtend<T1, T2, T3, T4, T5, T6>(obj1?: T1, obj2?: T2, obj3?: T3, obj4?: T4, obj5?: T5, obj6?: T6): T1 & T2 & T3 & T4 & T5 & T6;
|
|
124
|
+
export declare const asString: (value: any) => string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const UNDEFINED_VALUE: any;
|
|
1
2
|
export declare const STR_EMPTY = "";
|
|
2
3
|
export declare const STR_CHANNELS = "channels";
|
|
3
4
|
export declare const STR_CORE = "core";
|
|
@@ -14,3 +15,6 @@ export declare const STR_PERF_EVENT = "perfEvent";
|
|
|
14
15
|
export declare const STR_ERROR_TO_CONSOLE = "errorToConsole";
|
|
15
16
|
export declare const STR_WARN_TO_CONSOLE = "warnToConsole";
|
|
16
17
|
export declare const STR_GET_PERF_MGR = "getPerfMgr";
|
|
18
|
+
export declare const STR_DOMAIN = "domain";
|
|
19
|
+
export declare const STR_PATH = "path";
|
|
20
|
+
export declare const STR_NOT_DYNAMIC_ERROR = "Not dynamic - ";
|
|
@@ -11,30 +11,30 @@ export declare class NotificationManager implements INotificationManager {
|
|
|
11
11
|
constructor(config?: IConfiguration);
|
|
12
12
|
/**
|
|
13
13
|
* Adds a notification listener.
|
|
14
|
-
* @param
|
|
14
|
+
* @param listener - The notification listener to be added.
|
|
15
15
|
*/
|
|
16
16
|
addNotificationListener(listener: INotificationListener): void;
|
|
17
17
|
/**
|
|
18
18
|
* Removes all instances of the listener.
|
|
19
|
-
* @param
|
|
19
|
+
* @param listener - AWTNotificationListener to remove.
|
|
20
20
|
*/
|
|
21
21
|
removeNotificationListener(listener: INotificationListener): void;
|
|
22
22
|
/**
|
|
23
23
|
* Notification for events sent.
|
|
24
|
-
* @param
|
|
24
|
+
* @param events - The array of events that have been sent.
|
|
25
25
|
*/
|
|
26
26
|
eventsSent(events: ITelemetryItem[]): void;
|
|
27
27
|
/**
|
|
28
28
|
* Notification for events being discarded.
|
|
29
|
-
* @param
|
|
30
|
-
* @param
|
|
29
|
+
* @param events - The array of events that have been discarded by the SDK.
|
|
30
|
+
* @param reason - The reason for which the SDK discarded the events. The EventsDiscardedReason
|
|
31
31
|
* constant should be used to check the different values.
|
|
32
32
|
*/
|
|
33
33
|
eventsDiscarded(events: ITelemetryItem[], reason: number): void;
|
|
34
34
|
/**
|
|
35
35
|
* [Optional] A function called when the events have been requested to be sent to the sever.
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
36
|
+
* @param sendReason - The reason why the event batch is being sent.
|
|
37
|
+
* @param isAsync - A flag which identifies whether the requests are being sent in an async or sync manner.
|
|
38
38
|
*/
|
|
39
39
|
eventsSendRequest?(sendReason: number, isAsync: boolean): void;
|
|
40
40
|
/**
|
|
@@ -50,14 +50,14 @@ export declare class PerfManager implements IPerfManager {
|
|
|
50
50
|
/**
|
|
51
51
|
* Create a new event and start timing, the manager may return null/undefined to indicate that it does not
|
|
52
52
|
* want to monitor this source event.
|
|
53
|
-
* @param src The source name of the event
|
|
53
|
+
* @param src - The source name of the event
|
|
54
54
|
* @param payloadDetails - An optional callback function to fetch the payload details for the event.
|
|
55
55
|
* @param isAsync - Is the event occurring from a async event
|
|
56
56
|
*/
|
|
57
57
|
create(src: string, payload?: any, isAsync?: boolean): IPerfEvent | null | undefined;
|
|
58
58
|
/**
|
|
59
59
|
* Complete the perfEvent and fire any notifications.
|
|
60
|
-
* @param perfEvent Fire the event which will also complete the passed event
|
|
60
|
+
* @param perfEvent - Fire the event which will also complete the passed event
|
|
61
61
|
*/
|
|
62
62
|
fire(perfEvent: IPerfEvent): void;
|
|
63
63
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IConfigDefaults } from "../Config/IConfigDefaults";
|
|
1
2
|
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
2
3
|
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
3
4
|
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
@@ -12,7 +13,7 @@ import { ITelemetryPluginChain } from "../JavaScriptSDK.Interfaces/ITelemetryPlu
|
|
|
12
13
|
* @param core - The current core instance
|
|
13
14
|
* @param startAt - Identifies the next plugin to execute, if null there is no "next" plugin and if undefined it should assume the start of the chain
|
|
14
15
|
*/
|
|
15
|
-
export declare function createProcessTelemetryContext(telemetryChain: ITelemetryPluginChain | null,
|
|
16
|
+
export declare function createProcessTelemetryContext(telemetryChain: ITelemetryPluginChain | null, cfg: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin): IProcessTelemetryContext;
|
|
16
17
|
/**
|
|
17
18
|
* Creates a new Telemetry Item context with the current config, core and plugin execution chain for handling the unloading of the chain
|
|
18
19
|
* @param plugins - The plugin instances that will be executed
|
|
@@ -58,7 +59,7 @@ export declare class ProcessTelemetryContext implements IProcessTelemetryContext
|
|
|
58
59
|
* Gets the current core config instance
|
|
59
60
|
*/
|
|
60
61
|
getCfg: () => IConfiguration;
|
|
61
|
-
getExtCfg: <T>(identifier: string, defaultValue?: T
|
|
62
|
+
getExtCfg: <T>(identifier: string, defaultValue?: IConfigDefaults<T>) => T;
|
|
62
63
|
getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean | string[] | RegExp[] | Function) => number | string | boolean | string[] | RegExp[] | Function;
|
|
63
64
|
/**
|
|
64
65
|
* Returns the IAppInsightsCore instance for the current request
|
|
@@ -14,9 +14,9 @@ export declare function _getPluginState(plugin: IPlugin): IPluginState;
|
|
|
14
14
|
/**
|
|
15
15
|
* Initialize the queue of plugins
|
|
16
16
|
* @param plugins - The array of plugins to initialize and setting of the next plugin
|
|
17
|
-
* @param config The current config for the instance
|
|
18
|
-
* @param core THe current core instance
|
|
19
|
-
* @param extensions The extensions
|
|
17
|
+
* @param config - The current config for the instance
|
|
18
|
+
* @param core - THe current core instance
|
|
19
|
+
* @param extensions - The extensions
|
|
20
20
|
*/
|
|
21
21
|
export declare function initializePlugins(processContext: IProcessTelemetryContext, extensions: IPlugin[]): void;
|
|
22
22
|
export declare function sortPlugins<T = IPlugin>(plugins: T[]): T[];
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const enum eLoggingSeverity {
|
|
2
|
+
/**
|
|
3
|
+
* No Logging will be enabled
|
|
4
|
+
*/
|
|
5
|
+
DISABLED = 0,
|
|
2
6
|
/**
|
|
3
7
|
* Error will be sent as internal telemetry
|
|
4
8
|
*/
|
|
@@ -93,10 +97,8 @@ export declare const enum _eInternalMessageId {
|
|
|
93
97
|
TrackPageActionEventFailed = 103,
|
|
94
98
|
FailedAddingCustomDefinedRequestContext = 104,
|
|
95
99
|
InMemoryStorageBufferFull = 105,
|
|
96
|
-
InstrumentationKeyDeprecation = 106
|
|
100
|
+
InstrumentationKeyDeprecation = 106,
|
|
101
|
+
ConfigWatcherException = 107,
|
|
102
|
+
DynamicConfigException = 108
|
|
97
103
|
}
|
|
98
|
-
/**
|
|
99
|
-
* Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered
|
|
100
|
-
*/
|
|
101
|
-
export declare const _InternalMessageId: import("../JavaScriptSDK.Enums/EnumHelperFuncs").EnumValue<typeof _eInternalMessageId>;
|
|
102
104
|
export declare type _InternalMessageId = number | _eInternalMessageId;
|