@microsoft/applicationinsights-core-js 2.8.5-nightly.2206-02 → 2.8.5-nightly.2206-06
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 +814 -711
- 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 +864 -461
- package/dist/applicationinsights-core-js.d.ts +1 -1
- package/dist/applicationinsights-core-js.js +814 -711
- 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 +1 -1
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +19 -10
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +163 -139
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +44 -36
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +60 -61
- package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +46 -43
- package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +16 -15
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +7 -5
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +4 -3
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +61 -56
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +21 -20
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +45 -39
- package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +49 -40
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +18 -16
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +19 -21
- package/dist-esm/JavaScriptSDK/InternalConstants.js.map +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +31 -23
- package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +46 -35
- package/dist-esm/JavaScriptSDK/PerfManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +54 -53
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +5 -4
- package/dist-esm/JavaScriptSDK/RandomHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +34 -34
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +16 -10
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +4 -3
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js.map +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +26 -23
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +103 -86
- 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/IUnloadableComponent.js +1 -1
- package/dist-esm/__DynamicConstants.js +70 -0
- package/dist-esm/__DynamicConstants.js.map +1 -0
- package/dist-esm/applicationinsights-core-js.js +1 -1
- package/package.json +5 -2
- package/src/JavaScriptSDK/AppInsightsCore.ts +17 -17
- package/src/JavaScriptSDK/BaseCore.ts +112 -97
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +36 -32
- package/src/JavaScriptSDK/ChannelController.ts +39 -37
- package/src/JavaScriptSDK/CookieMgr.ts +27 -27
- package/src/JavaScriptSDK/CoreUtils.ts +19 -20
- package/src/JavaScriptSDK/DataCacheHelper.ts +12 -11
- package/src/JavaScriptSDK/DbgExtensionUtils.ts +9 -9
- package/src/JavaScriptSDK/DiagnosticLogger.ts +49 -50
- package/src/JavaScriptSDK/EnvUtils.ts +15 -17
- package/src/JavaScriptSDK/EventHelpers.ts +15 -14
- package/src/JavaScriptSDK/HelperFuncs.ts +20 -11
- package/src/JavaScriptSDK/InstrumentHooks.ts +11 -13
- package/src/JavaScriptSDK/InternalConstants.ts +20 -20
- package/src/JavaScriptSDK/NotificationManager.ts +27 -27
- package/src/JavaScriptSDK/PerfManager.ts +21 -19
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +38 -34
- package/src/JavaScriptSDK/RandomHelper.ts +8 -9
- package/src/JavaScriptSDK/TelemetryHelpers.ts +33 -34
- package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +17 -16
- package/src/JavaScriptSDK/UnloadHandlerContainer.ts +11 -11
- package/src/JavaScriptSDK/W3cTraceParent.ts +6 -6
- package/src/JavaScriptSDK.Enums/EventsDiscardedReason.ts +1 -1
- package/src/JavaScriptSDK.Enums/LoggingEnums.ts +72 -56
- package/src/JavaScriptSDK.Interfaces/IChannelControls.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +2 -2
- package/types/JavaScriptSDK/AppInsightsCore.d.ts +4 -4
- package/types/JavaScriptSDK/BaseCore.d.ts +11 -11
- package/types/JavaScriptSDK/BaseTelemetryPlugin.d.ts +4 -4
- package/types/JavaScriptSDK/ChannelController.d.ts +1 -2
- package/types/JavaScriptSDK/CookieMgr.d.ts +3 -3
- package/types/JavaScriptSDK/DiagnosticLogger.d.ts +2 -2
- package/types/JavaScriptSDK/HelperFuncs.d.ts +6 -0
- package/types/JavaScriptSDK/InstrumentHooks.d.ts +1 -1
- package/types/JavaScriptSDK/InternalConstants.d.ts +16 -20
- package/types/JavaScriptSDK/NotificationManager.d.ts +1 -1
- package/types/JavaScriptSDK/ProcessTelemetryContext.d.ts +2 -2
- package/types/JavaScriptSDK/TelemetryHelpers.d.ts +4 -4
- package/types/JavaScriptSDK.Interfaces/ITelemetryPlugin.d.ts +2 -2
- package/types/__DynamicConstants.d.ts +56 -0
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/JavaScriptSDK/Constants.js +0 -9
- package/dist-esm/JavaScriptSDK/Constants.js.map +0 -1
- package/src/JavaScriptSDK/Constants.ts +0 -5
- package/types/JavaScriptSDK/Constants.d.ts +0 -2
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { IUnloadableComponent } from "../JavaScriptSDK.Interfaces/IUnloadableComponent";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { isValidSpanId, isValidTraceId } from "./W3cTraceParent";
|
|
17
|
-
|
|
18
|
-
const strDoUnload = "_doUnload";
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
6
|
+
import { IDistributedTraceContext } from "../JavaScriptSDK.Interfaces/IDistributedTraceContext";
|
|
7
|
+
import { IProcessTelemetryContext, IProcessTelemetryUnloadContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
8
|
+
import { IPlugin, ITelemetryPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
9
|
+
import { ITelemetryPluginChain } from "../JavaScriptSDK.Interfaces/ITelemetryPluginChain";
|
|
10
|
+
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
11
|
+
import { ITraceParent } from "../JavaScriptSDK.Interfaces/ITraceParent";
|
|
12
|
+
import { IUnloadableComponent } from "../JavaScriptSDK.Interfaces/IUnloadableComponent";
|
|
13
|
+
import { createElmNodeData } from "./DataCacheHelper";
|
|
14
|
+
import { arrForEach, isFunction } from "./HelperFuncs";
|
|
15
|
+
import { STR_CORE, STR_PRIORITY, STR_PROCESS_TELEMETRY } from "./InternalConstants";
|
|
16
|
+
import { isValidSpanId, isValidTraceId } from "./W3cTraceParent";
|
|
17
|
+
|
|
19
18
|
export interface IPluginState {
|
|
20
19
|
core?: IAppInsightsCore;
|
|
21
20
|
isInitialized?: boolean;
|
|
@@ -47,18 +46,18 @@ export function initializePlugins(processContext: IProcessTelemetryContext, exte
|
|
|
47
46
|
let thePlugin = proxy.getPlugin();
|
|
48
47
|
if (thePlugin) {
|
|
49
48
|
if (lastPlugin &&
|
|
50
|
-
isFunction(lastPlugin
|
|
51
|
-
isFunction(thePlugin
|
|
49
|
+
isFunction(lastPlugin.setNextPlugin) &&
|
|
50
|
+
isFunction(thePlugin.processTelemetry)) {
|
|
52
51
|
// Set this plugin as the next for the previous one
|
|
53
|
-
lastPlugin
|
|
52
|
+
lastPlugin.setNextPlugin(thePlugin);
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
let isInitialized = false;
|
|
57
|
-
if (isFunction(thePlugin
|
|
58
|
-
isInitialized = thePlugin
|
|
56
|
+
if (isFunction(thePlugin.isInitialized)) {
|
|
57
|
+
isInitialized = thePlugin.isInitialized();
|
|
59
58
|
} else {
|
|
60
59
|
pluginState = _getPluginState(thePlugin);
|
|
61
|
-
isInitialized = pluginState
|
|
60
|
+
isInitialized = pluginState.isInitialized;
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
if (!isInitialized) {
|
|
@@ -72,7 +71,7 @@ export function initializePlugins(processContext: IProcessTelemetryContext, exte
|
|
|
72
71
|
|
|
73
72
|
// Now initialize the plugins
|
|
74
73
|
arrForEach(initPlugins, thePlugin => {
|
|
75
|
-
let core = processContext
|
|
74
|
+
let core = processContext[STR_CORE]();
|
|
76
75
|
|
|
77
76
|
thePlugin.initialize(
|
|
78
77
|
processContext.getCfg(),
|
|
@@ -83,12 +82,12 @@ export function initializePlugins(processContext: IProcessTelemetryContext, exte
|
|
|
83
82
|
pluginState = _getPluginState(thePlugin);
|
|
84
83
|
|
|
85
84
|
// Only add the core to the state if the plugin didn't set it (doesn't extent from BaseTelemetryPlugin)
|
|
86
|
-
if (!thePlugin[
|
|
87
|
-
pluginState[
|
|
85
|
+
if (!thePlugin[STR_CORE] && !pluginState[STR_CORE]) {
|
|
86
|
+
pluginState[STR_CORE] = core;
|
|
88
87
|
}
|
|
89
88
|
|
|
90
|
-
pluginState
|
|
91
|
-
delete pluginState
|
|
89
|
+
pluginState.isInitialized = true;
|
|
90
|
+
delete pluginState.teardown;
|
|
92
91
|
});
|
|
93
92
|
}
|
|
94
93
|
|
|
@@ -97,9 +96,9 @@ export function sortPlugins<T = IPlugin>(plugins:T[]) {
|
|
|
97
96
|
return plugins.sort((extA, extB) => {
|
|
98
97
|
let result = 0;
|
|
99
98
|
if (extB) {
|
|
100
|
-
let bHasProcess = isFunction(extB[
|
|
101
|
-
if (isFunction(extA[
|
|
102
|
-
result = bHasProcess ? extA[
|
|
99
|
+
let bHasProcess = isFunction(extB[STR_PROCESS_TELEMETRY]);
|
|
100
|
+
if (isFunction(extA[STR_PROCESS_TELEMETRY])) {
|
|
101
|
+
result = bHasProcess ? extA[STR_PRIORITY] - extB[STR_PRIORITY] : 1;
|
|
103
102
|
} else if (bHasProcess) {
|
|
104
103
|
result = -1;
|
|
105
104
|
}
|
|
@@ -128,7 +127,7 @@ export function unloadComponents(components: any | IUnloadableComponent[], unloa
|
|
|
128
127
|
while (idx < components.length) {
|
|
129
128
|
let component = components[idx++];
|
|
130
129
|
if (component) {
|
|
131
|
-
let func = component
|
|
130
|
+
let func = component._doUnload || component._doTeardown;
|
|
132
131
|
if (isFunction(func)) {
|
|
133
132
|
if (func.call(component, unloadCtx, unloadState, _doUnload) === true) {
|
|
134
133
|
return true;
|
|
@@ -184,4 +183,4 @@ export function createDistributedTraceContext(parentCtx?: IDistributedTraceConte
|
|
|
184
183
|
trace.traceFlags = newTraceFlags
|
|
185
184
|
}
|
|
186
185
|
};
|
|
187
|
-
}
|
|
186
|
+
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
// // Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// // Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
5
|
-
import {
|
|
6
|
-
import { IProcessTelemetryContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
1
|
+
// // Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// // Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
5
|
+
import { _eInternalMessageId, eLoggingSeverity } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
6
|
+
import { IProcessTelemetryContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
7
|
+
import {
|
|
8
|
+
ITelemetryInitializerContainer, ITelemetryInitializerHandler, TelemetryInitializerFunction
|
|
9
|
+
} from "../JavaScriptSDK.Interfaces/ITelemetryInitializers";
|
|
10
|
+
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
11
|
+
import { BaseTelemetryPlugin } from "./BaseTelemetryPlugin";
|
|
12
|
+
import { _throwInternal } from "./DiagnosticLogger";
|
|
13
|
+
import { dumpObj } from "./EnvUtils";
|
|
14
|
+
import { arrForEach, getExceptionName } from "./HelperFuncs";
|
|
15
|
+
|
|
15
16
|
interface _IInternalTelemetryInitializerHandler {
|
|
16
17
|
id: number;
|
|
17
18
|
fn: TelemetryInitializerFunction;
|
|
@@ -84,7 +85,7 @@ export class TelemetryInitializerPlugin extends BaseTelemetryPlugin implements I
|
|
|
84
85
|
}
|
|
85
86
|
};
|
|
86
87
|
|
|
87
|
-
_self
|
|
88
|
+
_self._doTeardown = () => {
|
|
88
89
|
_initDefaults();
|
|
89
90
|
};
|
|
90
91
|
});
|
|
@@ -108,4 +109,4 @@ export class TelemetryInitializerPlugin extends BaseTelemetryPlugin implements I
|
|
|
108
109
|
public processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void {
|
|
109
110
|
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
110
111
|
}
|
|
111
|
-
}
|
|
112
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import { IProcessTelemetryUnloadContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
6
|
-
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
7
|
-
import { _throwInternal } from "./DiagnosticLogger";
|
|
8
|
-
import { dumpObj } from "./EnvUtils";
|
|
9
|
-
import { arrForEach } from "./HelperFuncs";
|
|
10
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { _eInternalMessageId, eLoggingSeverity } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
5
|
+
import { IProcessTelemetryUnloadContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
6
|
+
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
7
|
+
import { _throwInternal } from "./DiagnosticLogger";
|
|
8
|
+
import { dumpObj } from "./EnvUtils";
|
|
9
|
+
import { arrForEach } from "./HelperFuncs";
|
|
10
|
+
|
|
11
11
|
export type UnloadHandler = (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
12
12
|
|
|
13
13
|
export interface IUnloadHandlerContainer {
|
|
@@ -43,4 +43,4 @@ export function createUnloadHandlerContainer() {
|
|
|
43
43
|
add: _addHandler,
|
|
44
44
|
run: _runHandlers
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ITraceParent } from "../JavaScriptSDK.Interfaces/ITraceParent";
|
|
2
|
-
import { generateW3CId } from "./CoreUtils";
|
|
3
|
-
import { findMetaTag, findNamedServerTiming } from "./EnvUtils";
|
|
4
|
-
import { isArray, isString, strTrim } from "./HelperFuncs";
|
|
5
|
-
|
|
1
|
+
import { ITraceParent } from "../JavaScriptSDK.Interfaces/ITraceParent";
|
|
2
|
+
import { generateW3CId } from "./CoreUtils";
|
|
3
|
+
import { findMetaTag, findNamedServerTiming } from "./EnvUtils";
|
|
4
|
+
import { isArray, isString, strTrim } from "./HelperFuncs";
|
|
5
|
+
|
|
6
6
|
// using {0,16} for leading and trailing whitespace just to constrain the possible runtime of a random string
|
|
7
7
|
const TRACE_PARENT_REGEX = /^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]*)?$/;
|
|
8
8
|
const DEFAULT_VERSION = "00";
|
|
@@ -193,4 +193,4 @@ export function findW3cTraceParent(): ITraceParent {
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
return traceParent;
|
|
196
|
-
}
|
|
196
|
+
}
|
|
@@ -68,4 +68,4 @@ export const EventsDiscardedReason = createEnumStyle<typeof eEventsDiscardedReas
|
|
|
68
68
|
QueueFull: eEventsDiscardedReason.QueueFull
|
|
69
69
|
});
|
|
70
70
|
|
|
71
|
-
export type EventsDiscardedReason = number | eEventsDiscardedReason;
|
|
71
|
+
export type EventsDiscardedReason = number | eEventsDiscardedReason;
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
+
// @skip-file-minify
|
|
3
4
|
|
|
4
5
|
import { createEnumStyle } from "../JavaScriptSDK.Enums/EnumHelperFuncs";
|
|
5
6
|
|
|
7
|
+
const FAILED = "Failed";
|
|
8
|
+
const FAILED_MONITOR_AJAX = FAILED + "MonitorAjax";
|
|
9
|
+
const TRACK = "Track";
|
|
10
|
+
const START = "Start";
|
|
11
|
+
const STOP = "Stop";
|
|
12
|
+
const EVENT = "Event";
|
|
13
|
+
const AUTH_CONTEXT = "AuthContext";
|
|
14
|
+
const EXCEPTION = "Exception";
|
|
15
|
+
const LOCAL = "Local";
|
|
16
|
+
const SESSION = "Session";
|
|
17
|
+
const STORAGE = "Storage";
|
|
18
|
+
const BROWSER = "Browser";
|
|
19
|
+
const CANNOT = "Cannot";
|
|
20
|
+
const BUFFER = "Buffer";
|
|
21
|
+
const INSTRUMENTATION_KEY = "InstrumentationKey";
|
|
22
|
+
|
|
6
23
|
export const enum eLoggingSeverity {
|
|
7
24
|
/**
|
|
8
25
|
* Error will be sent as internal telemetry
|
|
@@ -114,91 +131,90 @@ export const enum _eInternalMessageId {
|
|
|
114
131
|
*/
|
|
115
132
|
export const _InternalMessageId = createEnumStyle<typeof _eInternalMessageId>({
|
|
116
133
|
// Non user actionable
|
|
117
|
-
BrowserDoesNotSupportLocalStorage: _eInternalMessageId.BrowserDoesNotSupportLocalStorage,
|
|
118
|
-
BrowserCannotReadLocalStorage: _eInternalMessageId.BrowserCannotReadLocalStorage,
|
|
119
|
-
BrowserCannotReadSessionStorage: _eInternalMessageId.BrowserCannotReadSessionStorage,
|
|
120
|
-
BrowserCannotWriteLocalStorage: _eInternalMessageId.BrowserCannotWriteLocalStorage,
|
|
121
|
-
BrowserCannotWriteSessionStorage: _eInternalMessageId.BrowserCannotWriteSessionStorage,
|
|
122
|
-
BrowserFailedRemovalFromLocalStorage: _eInternalMessageId.BrowserFailedRemovalFromLocalStorage,
|
|
123
|
-
BrowserFailedRemovalFromSessionStorage: _eInternalMessageId.BrowserFailedRemovalFromSessionStorage,
|
|
124
|
-
CannotSendEmptyTelemetry: _eInternalMessageId.CannotSendEmptyTelemetry,
|
|
134
|
+
[BROWSER + "DoesNotSupport" + LOCAL + STORAGE as "BrowserDoesNotSupportLocalStorage"]: _eInternalMessageId.BrowserDoesNotSupportLocalStorage,
|
|
135
|
+
[BROWSER + CANNOT + "Read" + LOCAL + STORAGE as "BrowserCannotReadLocalStorage"]: _eInternalMessageId.BrowserCannotReadLocalStorage,
|
|
136
|
+
[BROWSER + CANNOT + "Read" + SESSION + STORAGE as "BrowserCannotReadSessionStorage"]: _eInternalMessageId.BrowserCannotReadSessionStorage,
|
|
137
|
+
[BROWSER + CANNOT + "Write" + LOCAL + STORAGE as "BrowserCannotWriteLocalStorage"]: _eInternalMessageId.BrowserCannotWriteLocalStorage,
|
|
138
|
+
[BROWSER + CANNOT + "Write" + SESSION + STORAGE as "BrowserCannotWriteSessionStorage"]: _eInternalMessageId.BrowserCannotWriteSessionStorage,
|
|
139
|
+
[BROWSER + FAILED + "RemovalFrom" + LOCAL + STORAGE as "BrowserFailedRemovalFromLocalStorage"]: _eInternalMessageId.BrowserFailedRemovalFromLocalStorage,
|
|
140
|
+
[BROWSER + FAILED + "RemovalFrom" + SESSION + STORAGE as "BrowserFailedRemovalFromSessionStorage"]: _eInternalMessageId.BrowserFailedRemovalFromSessionStorage,
|
|
141
|
+
[CANNOT + "SendEmptyTelemetry" as "CannotSendEmptyTelemetry"]: _eInternalMessageId.CannotSendEmptyTelemetry,
|
|
125
142
|
ClientPerformanceMathError: _eInternalMessageId.ClientPerformanceMathError,
|
|
126
|
-
ErrorParsingAISessionCookie: _eInternalMessageId.ErrorParsingAISessionCookie,
|
|
143
|
+
["ErrorParsingAI" + SESSION + "Cookie" as "ErrorParsingAISessionCookie"]: _eInternalMessageId.ErrorParsingAISessionCookie,
|
|
127
144
|
ErrorPVCalc: _eInternalMessageId.ErrorPVCalc,
|
|
128
|
-
ExceptionWhileLoggingError: _eInternalMessageId.ExceptionWhileLoggingError,
|
|
129
|
-
FailedAddingTelemetryToBuffer: _eInternalMessageId.FailedAddingTelemetryToBuffer,
|
|
130
|
-
FailedMonitorAjaxAbort: _eInternalMessageId.FailedMonitorAjaxAbort,
|
|
131
|
-
FailedMonitorAjaxDur: _eInternalMessageId.FailedMonitorAjaxDur,
|
|
132
|
-
FailedMonitorAjaxOpen: _eInternalMessageId.FailedMonitorAjaxOpen,
|
|
133
|
-
FailedMonitorAjaxRSC: _eInternalMessageId.FailedMonitorAjaxRSC,
|
|
134
|
-
FailedMonitorAjaxSend: _eInternalMessageId.FailedMonitorAjaxSend,
|
|
135
|
-
FailedMonitorAjaxGetCorrelationHeader: _eInternalMessageId.FailedMonitorAjaxGetCorrelationHeader,
|
|
136
|
-
FailedToAddHandlerForOnBeforeUnload: _eInternalMessageId.FailedToAddHandlerForOnBeforeUnload,
|
|
137
|
-
FailedToSendQueuedTelemetry: _eInternalMessageId.FailedToSendQueuedTelemetry,
|
|
138
|
-
FailedToReportDataLoss: _eInternalMessageId.FailedToReportDataLoss,
|
|
139
|
-
FlushFailed: _eInternalMessageId.FlushFailed,
|
|
145
|
+
[EXCEPTION + "WhileLoggingError" as "ExceptionWhileLoggingError"]: _eInternalMessageId.ExceptionWhileLoggingError,
|
|
146
|
+
[FAILED + "AddingTelemetryTo" + BUFFER as "FailedAddingTelemetryToBuffer"]: _eInternalMessageId.FailedAddingTelemetryToBuffer,
|
|
147
|
+
[FAILED_MONITOR_AJAX + "Abort" as "FailedMonitorAjaxAbort"]: _eInternalMessageId.FailedMonitorAjaxAbort,
|
|
148
|
+
[FAILED_MONITOR_AJAX + "Dur" as "FailedMonitorAjaxDur"]: _eInternalMessageId.FailedMonitorAjaxDur,
|
|
149
|
+
[FAILED_MONITOR_AJAX + "Open" as "FailedMonitorAjaxOpen"]: _eInternalMessageId.FailedMonitorAjaxOpen,
|
|
150
|
+
[FAILED_MONITOR_AJAX + "RSC" as "FailedMonitorAjaxRSC"]: _eInternalMessageId.FailedMonitorAjaxRSC,
|
|
151
|
+
[FAILED_MONITOR_AJAX + "Send" as "FailedMonitorAjaxSend"]: _eInternalMessageId.FailedMonitorAjaxSend,
|
|
152
|
+
[FAILED_MONITOR_AJAX + "GetCorrelationHeader" as "FailedMonitorAjaxGetCorrelationHeader"]: _eInternalMessageId.FailedMonitorAjaxGetCorrelationHeader,
|
|
153
|
+
[FAILED + "ToAddHandlerForOnBeforeUnload" as "FailedToAddHandlerForOnBeforeUnload"]: _eInternalMessageId.FailedToAddHandlerForOnBeforeUnload,
|
|
154
|
+
[FAILED + "ToSendQueuedTelemetry" as "FailedToSendQueuedTelemetry"]: _eInternalMessageId.FailedToSendQueuedTelemetry,
|
|
155
|
+
[FAILED + "ToReportDataLoss" as "FailedToReportDataLoss"]: _eInternalMessageId.FailedToReportDataLoss,
|
|
156
|
+
["Flush" + FAILED as "FlushFailed"]: _eInternalMessageId.FlushFailed,
|
|
140
157
|
MessageLimitPerPVExceeded: _eInternalMessageId.MessageLimitPerPVExceeded,
|
|
141
158
|
MissingRequiredFieldSpecification: _eInternalMessageId.MissingRequiredFieldSpecification,
|
|
142
159
|
NavigationTimingNotSupported: _eInternalMessageId.NavigationTimingNotSupported,
|
|
143
160
|
OnError: _eInternalMessageId.OnError,
|
|
144
|
-
SessionRenewalDateIsZero: _eInternalMessageId.SessionRenewalDateIsZero,
|
|
161
|
+
[SESSION + "RenewalDateIsZero" as "SessionRenewalDateIsZero"]: _eInternalMessageId.SessionRenewalDateIsZero,
|
|
145
162
|
SenderNotInitialized: _eInternalMessageId.SenderNotInitialized,
|
|
146
|
-
StartTrackEventFailed: _eInternalMessageId.StartTrackEventFailed,
|
|
147
|
-
StopTrackEventFailed: _eInternalMessageId.StopTrackEventFailed,
|
|
148
|
-
StartTrackFailed: _eInternalMessageId.StartTrackFailed,
|
|
149
|
-
StopTrackFailed: _eInternalMessageId.StopTrackFailed,
|
|
163
|
+
[START + TRACK + EVENT + FAILED as "StartTrackEventFailed"]: _eInternalMessageId.StartTrackEventFailed,
|
|
164
|
+
[STOP + TRACK + EVENT + FAILED as "StopTrackEventFailed"]: _eInternalMessageId.StopTrackEventFailed,
|
|
165
|
+
[START + TRACK + FAILED as "StartTrackFailed"]: _eInternalMessageId.StartTrackFailed,
|
|
166
|
+
[STOP + TRACK + FAILED as "StopTrackFailed"]: _eInternalMessageId.StopTrackFailed,
|
|
150
167
|
TelemetrySampledAndNotSent: _eInternalMessageId.TelemetrySampledAndNotSent,
|
|
151
|
-
TrackEventFailed: _eInternalMessageId.TrackEventFailed,
|
|
152
|
-
TrackExceptionFailed: _eInternalMessageId.TrackExceptionFailed,
|
|
153
|
-
TrackMetricFailed: _eInternalMessageId.TrackMetricFailed,
|
|
154
|
-
TrackPVFailed: _eInternalMessageId.TrackPVFailed,
|
|
155
|
-
TrackPVFailedCalc: _eInternalMessageId.TrackPVFailedCalc,
|
|
156
|
-
TrackTraceFailed: _eInternalMessageId.TrackTraceFailed,
|
|
157
|
-
TransmissionFailed: _eInternalMessageId.TransmissionFailed,
|
|
158
|
-
FailedToSetStorageBuffer: _eInternalMessageId.FailedToSetStorageBuffer,
|
|
159
|
-
FailedToRestoreStorageBuffer: _eInternalMessageId.FailedToRestoreStorageBuffer,
|
|
168
|
+
[TRACK + EVENT + FAILED as "TrackEventFailed"]: _eInternalMessageId.TrackEventFailed,
|
|
169
|
+
[TRACK + EXCEPTION + FAILED as "TrackExceptionFailed"]: _eInternalMessageId.TrackExceptionFailed,
|
|
170
|
+
[TRACK + "Metric" + FAILED as "TrackMetricFailed"]: _eInternalMessageId.TrackMetricFailed,
|
|
171
|
+
[TRACK + "PV" + FAILED as "TrackPVFailed"]: _eInternalMessageId.TrackPVFailed,
|
|
172
|
+
[TRACK + "PV" + FAILED + "Calc" as "TrackPVFailedCalc"]: _eInternalMessageId.TrackPVFailedCalc,
|
|
173
|
+
[TRACK + "Trace" + FAILED as "TrackTraceFailed"]: _eInternalMessageId.TrackTraceFailed,
|
|
174
|
+
["Transmission" + FAILED as "TransmissionFailed"]: _eInternalMessageId.TransmissionFailed,
|
|
175
|
+
[FAILED + "ToSet" + STORAGE + BUFFER as "FailedToSetStorageBuffer"]: _eInternalMessageId.FailedToSetStorageBuffer,
|
|
176
|
+
[FAILED + "ToRestore" + STORAGE + BUFFER as "FailedToRestoreStorageBuffer"]: _eInternalMessageId.FailedToRestoreStorageBuffer,
|
|
160
177
|
InvalidBackendResponse: _eInternalMessageId.InvalidBackendResponse,
|
|
161
|
-
FailedToFixDepricatedValues: _eInternalMessageId.FailedToFixDepricatedValues,
|
|
178
|
+
[FAILED + "ToFixDepricatedValues" as "FailedToFixDepricatedValues"]: _eInternalMessageId.FailedToFixDepricatedValues,
|
|
162
179
|
InvalidDurationValue: _eInternalMessageId.InvalidDurationValue,
|
|
163
180
|
TelemetryEnvelopeInvalid: _eInternalMessageId.TelemetryEnvelopeInvalid,
|
|
164
181
|
CreateEnvelopeError: _eInternalMessageId.CreateEnvelopeError,
|
|
165
182
|
|
|
166
183
|
// User actionable
|
|
167
|
-
CannotSerializeObject: _eInternalMessageId.CannotSerializeObject,
|
|
168
|
-
CannotSerializeObjectNonSerializable: _eInternalMessageId.CannotSerializeObjectNonSerializable,
|
|
184
|
+
[CANNOT + "SerializeObject" as "CannotSerializeObject"]: _eInternalMessageId.CannotSerializeObject,
|
|
185
|
+
[CANNOT + "SerializeObjectNonSerializable" as "CannotSerializeObjectNonSerializable"]: _eInternalMessageId.CannotSerializeObjectNonSerializable,
|
|
169
186
|
CircularReferenceDetected: _eInternalMessageId.CircularReferenceDetected,
|
|
170
|
-
ClearAuthContextFailed: _eInternalMessageId.ClearAuthContextFailed,
|
|
171
|
-
ExceptionTruncated: _eInternalMessageId.ExceptionTruncated,
|
|
187
|
+
["Clear" + AUTH_CONTEXT + FAILED as "ClearAuthContextFailed"]: _eInternalMessageId.ClearAuthContextFailed,
|
|
188
|
+
[EXCEPTION + "Truncated" as "ExceptionTruncated"]: _eInternalMessageId.ExceptionTruncated,
|
|
172
189
|
IllegalCharsInName: _eInternalMessageId.IllegalCharsInName,
|
|
173
190
|
ItemNotInArray: _eInternalMessageId.ItemNotInArray,
|
|
174
191
|
MaxAjaxPerPVExceeded: _eInternalMessageId.MaxAjaxPerPVExceeded,
|
|
175
192
|
MessageTruncated: _eInternalMessageId.MessageTruncated,
|
|
176
193
|
NameTooLong: _eInternalMessageId.NameTooLong,
|
|
177
194
|
SampleRateOutOfRange: _eInternalMessageId.SampleRateOutOfRange,
|
|
178
|
-
SetAuthContextFailed: _eInternalMessageId.SetAuthContextFailed,
|
|
179
|
-
SetAuthContextFailedAccountName: _eInternalMessageId.SetAuthContextFailedAccountName,
|
|
195
|
+
["Set" + AUTH_CONTEXT + FAILED as "SetAuthContextFailed"]: _eInternalMessageId.SetAuthContextFailed,
|
|
196
|
+
["Set" + AUTH_CONTEXT + FAILED + "AccountName" as "SetAuthContextFailedAccountName"]: _eInternalMessageId.SetAuthContextFailedAccountName,
|
|
180
197
|
StringValueTooLong: _eInternalMessageId.StringValueTooLong,
|
|
181
198
|
StartCalledMoreThanOnce: _eInternalMessageId.StartCalledMoreThanOnce,
|
|
182
199
|
StopCalledWithoutStart: _eInternalMessageId.StopCalledWithoutStart,
|
|
183
|
-
TelemetryInitializerFailed: _eInternalMessageId.TelemetryInitializerFailed,
|
|
200
|
+
["TelemetryInitializer" + FAILED as "TelemetryInitializerFailed"]: _eInternalMessageId.TelemetryInitializerFailed,
|
|
184
201
|
TrackArgumentsNotSpecified: _eInternalMessageId.TrackArgumentsNotSpecified,
|
|
185
202
|
UrlTooLong: _eInternalMessageId.UrlTooLong,
|
|
186
|
-
SessionStorageBufferFull: _eInternalMessageId.SessionStorageBufferFull,
|
|
187
|
-
CannotAccessCookie: _eInternalMessageId.CannotAccessCookie,
|
|
203
|
+
[SESSION + STORAGE + BUFFER + "Full" as "SessionStorageBufferFull"]: _eInternalMessageId.SessionStorageBufferFull,
|
|
204
|
+
[CANNOT + "AccessCookie" as "CannotAccessCookie"]: _eInternalMessageId.CannotAccessCookie,
|
|
188
205
|
IdTooLong: _eInternalMessageId.IdTooLong,
|
|
189
206
|
InvalidEvent: _eInternalMessageId.InvalidEvent,
|
|
190
|
-
FailedMonitorAjaxSetRequestHeader: _eInternalMessageId.FailedMonitorAjaxSetRequestHeader,
|
|
191
|
-
SendBrowserInfoOnUserInit: _eInternalMessageId.SendBrowserInfoOnUserInit,
|
|
192
|
-
PluginException: _eInternalMessageId.PluginException,
|
|
193
|
-
NotificationException: _eInternalMessageId.NotificationException,
|
|
207
|
+
[FAILED_MONITOR_AJAX + "SetRequestHeader" as "FailedMonitorAjaxSetRequestHeader"]: _eInternalMessageId.FailedMonitorAjaxSetRequestHeader,
|
|
208
|
+
["Send" + BROWSER + "InfoOnUserInit" as "SendBrowserInfoOnUserInit"]: _eInternalMessageId.SendBrowserInfoOnUserInit,
|
|
209
|
+
["Plugin" + EXCEPTION as "PluginException"]: _eInternalMessageId.PluginException,
|
|
210
|
+
["Notification" + EXCEPTION as "NotificationException"]: _eInternalMessageId.NotificationException,
|
|
194
211
|
SnippetScriptLoadFailure: _eInternalMessageId.SnippetScriptLoadFailure,
|
|
195
|
-
InvalidInstrumentationKey: _eInternalMessageId.InvalidInstrumentationKey,
|
|
196
|
-
CannotParseAiBlobValue: _eInternalMessageId.CannotParseAiBlobValue,
|
|
212
|
+
["Invalid" + INSTRUMENTATION_KEY as "InvalidInstrumentationKey"]: _eInternalMessageId.InvalidInstrumentationKey,
|
|
213
|
+
[CANNOT + "ParseAiBlobValue" as "CannotParseAiBlobValue"]: _eInternalMessageId.CannotParseAiBlobValue,
|
|
197
214
|
InvalidContentBlob: _eInternalMessageId.InvalidContentBlob,
|
|
198
|
-
TrackPageActionEventFailed: _eInternalMessageId.TrackPageActionEventFailed,
|
|
199
|
-
FailedAddingCustomDefinedRequestContext: _eInternalMessageId.FailedAddingCustomDefinedRequestContext,
|
|
200
|
-
InMemoryStorageBufferFull: _eInternalMessageId.InMemoryStorageBufferFull,
|
|
201
|
-
InstrumentationKeyDeprecation: _eInternalMessageId.InstrumentationKeyDeprecation
|
|
202
|
-
|
|
215
|
+
[TRACK + "PageAction" + EVENT + FAILED as "TrackPageActionEventFailed"]: _eInternalMessageId.TrackPageActionEventFailed,
|
|
216
|
+
[FAILED + "AddingCustomDefinedRequestContext" as "FailedAddingCustomDefinedRequestContext"]: _eInternalMessageId.FailedAddingCustomDefinedRequestContext,
|
|
217
|
+
["InMemory" + STORAGE + BUFFER + "Full" as "InMemoryStorageBufferFull"]: _eInternalMessageId.InMemoryStorageBufferFull,
|
|
218
|
+
[INSTRUMENTATION_KEY + "Deprecation" as "InstrumentationKeyDeprecation"]: _eInternalMessageId.InstrumentationKeyDeprecation
|
|
203
219
|
});
|
|
204
220
|
export type _InternalMessageId = number | _eInternalMessageId;
|
|
@@ -43,4 +43,4 @@ export interface IChannelControls extends ITelemetryPlugin {
|
|
|
43
43
|
flush(async: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): boolean | void;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export const MinChannelPriorty: number = 100;
|
|
46
|
+
export const MinChannelPriorty: number = 100;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
"use strict";
|
|
4
4
|
|
|
5
|
-
import { ITelemetryItem } from "./ITelemetryItem";
|
|
6
|
-
import { IConfiguration } from "./IConfiguration";
|
|
7
5
|
import { IAppInsightsCore } from "./IAppInsightsCore";
|
|
6
|
+
import { IConfiguration } from "./IConfiguration";
|
|
8
7
|
import { IProcessTelemetryContext, IProcessTelemetryUnloadContext, IProcessTelemetryUpdateContext } from "./IProcessTelemetryContext";
|
|
8
|
+
import { ITelemetryItem } from "./ITelemetryItem";
|
|
9
9
|
import { ITelemetryPluginChain } from "./ITelemetryPluginChain";
|
|
10
10
|
import { ITelemetryUnloadState } from "./ITelemetryUnloadState";
|
|
11
11
|
import { ITelemetryUpdateState } from "./ITelemetryUpdateState";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
2
|
-
import { BaseCore } from "./BaseCore";
|
|
3
2
|
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
4
|
-
import { IPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
5
|
-
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
6
|
-
import { INotificationManager } from "../JavaScriptSDK.Interfaces/INotificationManager";
|
|
7
3
|
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
4
|
+
import { INotificationManager } from "../JavaScriptSDK.Interfaces/INotificationManager";
|
|
5
|
+
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
6
|
+
import { IPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
7
|
+
import { BaseCore } from "./BaseCore";
|
|
8
8
|
export declare class AppInsightsCore extends BaseCore implements IAppInsightsCore {
|
|
9
9
|
constructor();
|
|
10
10
|
initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
+
import { SendRequestReason } from "../JavaScriptSDK.Enums/SendRequestReason";
|
|
1
2
|
import { IAppInsightsCore, ILoadedPlugin } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
2
|
-
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
3
|
-
import { IPlugin, ITelemetryPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
4
3
|
import { IChannelControls } from "../JavaScriptSDK.Interfaces/IChannelControls";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { INotificationListener } from "../JavaScriptSDK.Interfaces/INotificationListener";
|
|
4
|
+
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
5
|
+
import { ICookieMgr } from "../JavaScriptSDK.Interfaces/ICookieMgr";
|
|
8
6
|
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
9
|
-
import {
|
|
7
|
+
import { IDistributedTraceContext } from "../JavaScriptSDK.Interfaces/IDistributedTraceContext";
|
|
8
|
+
import { INotificationListener } from "../JavaScriptSDK.Interfaces/INotificationListener";
|
|
9
|
+
import { INotificationManager } from "../JavaScriptSDK.Interfaces/INotificationManager";
|
|
10
10
|
import { IPerfManager } from "../JavaScriptSDK.Interfaces/IPerfManager";
|
|
11
|
-
import {
|
|
11
|
+
import { IProcessTelemetryContext, IProcessTelemetryUpdateContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
12
12
|
import { ITelemetryInitializerHandler, TelemetryInitializerFunction } from "../JavaScriptSDK.Interfaces/ITelemetryInitializers";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
14
|
+
import { IPlugin, ITelemetryPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
15
15
|
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { ITelemetryUpdateState } from "../JavaScriptSDK.Interfaces/ITelemetryUpdateState";
|
|
17
|
+
import { UnloadHandler } from "./UnloadHandlerContainer";
|
|
18
18
|
export declare class BaseCore implements IAppInsightsCore {
|
|
19
19
|
static defaultConfig: IConfiguration;
|
|
20
20
|
config: IConfiguration;
|
|
@@ -1,14 +1,14 @@
|
|
|
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 {
|
|
5
|
-
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
4
|
+
import { IInstrumentHook } from "../JavaScriptSDK.Interfaces/IInstrumentHooks";
|
|
6
5
|
import { IProcessTelemetryContext, IProcessTelemetryUnloadContext, IProcessTelemetryUpdateContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
6
|
+
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
7
|
+
import { IPlugin, ITelemetryPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
7
8
|
import { ITelemetryPluginChain } from "../JavaScriptSDK.Interfaces/ITelemetryPluginChain";
|
|
8
|
-
import { UnloadHandler } from "./UnloadHandlerContainer";
|
|
9
|
-
import { IInstrumentHook } from "../JavaScriptSDK.Interfaces/IInstrumentHooks";
|
|
10
9
|
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
11
10
|
import { ITelemetryUpdateState } from "../JavaScriptSDK.Interfaces/ITelemetryUpdateState";
|
|
11
|
+
import { UnloadHandler } from "./UnloadHandlerContainer";
|
|
12
12
|
/**
|
|
13
13
|
* BaseTelemetryPlugin provides a basic implementation of the ITelemetryPlugin interface so that plugins
|
|
14
14
|
* can avoid implementation the same set of boiler plate code as well as provide a base
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SendRequestReason } from "../JavaScriptSDK.Enums/SendRequestReason";
|
|
2
2
|
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
3
3
|
import { IChannelControls } from "../JavaScriptSDK.Interfaces/IChannelControls";
|
|
4
|
-
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
5
4
|
import { IPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
6
5
|
import { ITelemetryPluginChain } from "../JavaScriptSDK.Interfaces/ITelemetryPluginChain";
|
|
7
6
|
export declare const ChannelControllerPriority = 500;
|
|
@@ -17,4 +16,4 @@ export interface _IInternalChannels {
|
|
|
17
16
|
chain: ITelemetryPluginChain;
|
|
18
17
|
}
|
|
19
18
|
export declare function createChannelControllerPlugin(channelQueue: _IInternalChannels[], core: IAppInsightsCore): IChannelController;
|
|
20
|
-
export declare function createChannelQueues(channels: IChannelControls[][], extensions: IPlugin[],
|
|
19
|
+
export declare function createChannelQueues(channels: IChannelControls[][], extensions: IPlugin[], core: IAppInsightsCore): _IInternalChannels[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
2
|
-
import { ICookieMgr } from "../JavaScriptSDK.Interfaces/ICookieMgr";
|
|
3
|
-
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
4
1
|
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
2
|
+
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
3
|
+
import { ICookieMgr } from "../JavaScriptSDK.Interfaces/ICookieMgr";
|
|
4
|
+
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
5
5
|
/**
|
|
6
6
|
* @ignore
|
|
7
7
|
* DO NOT USE or export from the module, this is exposed as public to support backward compatibility of previous static utility methods only.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { LoggingSeverity, _InternalMessageId } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
2
|
+
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
1
3
|
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
2
|
-
import { _InternalMessageId, LoggingSeverity } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
3
4
|
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
4
|
-
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
5
5
|
export declare class _InternalLogMessage {
|
|
6
6
|
static dataType: string;
|
|
7
7
|
message: string;
|
|
@@ -201,6 +201,12 @@ export declare function setValue<T, K extends keyof T>(target: T, field: K, valu
|
|
|
201
201
|
* @param defValue - [Optional] The value to set if not already present, when not provided a empty object will be added
|
|
202
202
|
*/
|
|
203
203
|
export declare function getSetValue<T, K extends keyof T>(target: T, field: K, defValue?: T[K]): T[K];
|
|
204
|
+
/**
|
|
205
|
+
* Get the mapped config value, if null or undefined any supplied defaultValue will be returned.
|
|
206
|
+
* @param field - The name of the field as the named enum value (number) or the string name.
|
|
207
|
+
* @param defaultValue - The default value to return if the config field is not present, null or undefined.
|
|
208
|
+
*/
|
|
209
|
+
export declare function getCfgValue<V>(theValue: V, defaultValue?: V): V;
|
|
204
210
|
export declare function isNotTruthy(value: any): boolean;
|
|
205
211
|
export declare function isTruthy(value: any): boolean;
|
|
206
212
|
export declare function throwError(message: string): never;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IInstrumentHook, IInstrumentHooksCallbacks } from "../JavaScriptSDK.Interfaces/IInstrumentHooks";
|
|
2
2
|
/**
|
|
3
3
|
* Intercept the named prototype functions for the target class / object
|
|
4
4
|
* @param target - The target object
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const strEventsSent = "eventsSent";
|
|
18
|
-
export declare const strEventsDiscarded = "eventsDiscarded";
|
|
19
|
-
export declare const strEventsSendRequest = "eventsSendRequest";
|
|
20
|
-
export declare const strPerfEvent = "perfEvent";
|
|
1
|
+
export declare const STR_EMPTY = "";
|
|
2
|
+
export declare const STR_CHANNELS = "channels";
|
|
3
|
+
export declare const STR_CORE = "core";
|
|
4
|
+
export declare const STR_CREATE_PERF_MGR = "createPerfMgr";
|
|
5
|
+
export declare const STR_DISABLED = "disabled";
|
|
6
|
+
export declare const STR_EXTENSION_CONFIG = "extensionConfig";
|
|
7
|
+
export declare const STR_EXTENSIONS = "extensions";
|
|
8
|
+
export declare const STR_PROCESS_TELEMETRY = "processTelemetry";
|
|
9
|
+
export declare const STR_PRIORITY = "priority";
|
|
10
|
+
export declare const STR_EVENTS_SENT = "eventsSent";
|
|
11
|
+
export declare const STR_EVENTS_DISCARDED = "eventsDiscarded";
|
|
12
|
+
export declare const STR_EVENTS_SEND_REQUEST = "eventsSendRequest";
|
|
13
|
+
export declare const STR_PERF_EVENT = "perfEvent";
|
|
14
|
+
export declare const STR_ERROR_TO_CONSOLE = "errorToConsole";
|
|
15
|
+
export declare const STR_WARN_TO_CONSOLE = "warnToConsole";
|
|
16
|
+
export declare const STR_GET_PERF_MGR = "getPerfMgr";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
2
|
-
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
3
2
|
import { INotificationListener } from "../JavaScriptSDK.Interfaces/INotificationListener";
|
|
4
3
|
import { INotificationManager } from "../JavaScriptSDK.Interfaces/INotificationManager";
|
|
5
4
|
import { IPerfEvent } from "../JavaScriptSDK.Interfaces/IPerfEvent";
|
|
5
|
+
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
6
6
|
/**
|
|
7
7
|
* Class to manage sending notifications to all the listeners.
|
|
8
8
|
*/
|