@microsoft/applicationinsights-core-js 3.0.0-beta.2302-01 → 3.0.0-beta.2302-03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +65 -28
- 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 +9 -9
- package/dist/applicationinsights-core-js.d.ts +1 -1
- package/dist/applicationinsights-core-js.js +65 -28
- 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/Config/ConfigDefaults.js +1 -1
- package/dist-esm/Config/DynamicConfig.js +1 -1
- package/dist-esm/Config/DynamicProperty.js +1 -1
- package/dist-esm/Config/DynamicState.js +1 -1
- package/dist-esm/Config/DynamicSupport.js +1 -1
- package/dist-esm/Config/IConfigDefaults.js +1 -1
- package/dist-esm/Config/IDynamicConfigHandler.js +1 -1
- package/dist-esm/Config/IDynamicPropertyHandler.js +1 -1
- package/dist-esm/Config/IDynamicWatcher.js +1 -1
- package/dist-esm/Config/_IDynamicConfigHandlerState.js +1 -1
- package/dist-esm/JavaScriptSDK/AggregationError.js +1 -1
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/Constants.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHookContainer.js +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +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 +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 +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
- package/dist-esm/__DynamicConstants.js +4 -4
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +1 -1
- package/package.json +4 -4
- package/src/JavaScriptSDK/AggregationError.ts +6 -6
- package/src/JavaScriptSDK/AppInsightsCore.ts +55 -55
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +31 -31
- package/src/JavaScriptSDK/CookieMgr.ts +19 -19
- package/src/JavaScriptSDK/CoreUtils.ts +9 -9
- package/src/JavaScriptSDK/DataCacheHelper.ts +9 -9
- package/src/JavaScriptSDK/DbgExtensionUtils.ts +10 -10
- package/src/JavaScriptSDK/DiagnosticLogger.ts +16 -16
- package/src/JavaScriptSDK/EnvUtils.ts +10 -10
- package/src/JavaScriptSDK/EventHelpers.ts +7 -7
- package/src/JavaScriptSDK/HelperFuncs.ts +10 -10
- package/src/JavaScriptSDK/InstrumentHooks.ts +11 -11
- package/src/JavaScriptSDK/NotificationManager.ts +13 -13
- package/src/JavaScriptSDK/PerfManager.ts +10 -10
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +30 -30
- package/src/JavaScriptSDK/RandomHelper.ts +7 -7
- package/src/JavaScriptSDK/TelemetryHelpers.ts +18 -18
- package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +16 -16
- package/src/JavaScriptSDK/UnloadHandlerContainer.ts +10 -10
- package/src/JavaScriptSDK/W3cTraceParent.ts +7 -7
- package/types/Config/IConfigDefaults.d.ts +3 -3
- package/types/Config/IDynamicWatcher.d.ts +1 -1
- package/types/JavaScriptSDK/UnloadHandlerContainer.d.ts +1 -1
- package/types/JavaScriptSDK.Enums/EventsDiscardedReason.d.ts +1 -1
- package/types/JavaScriptSDK.Enums/LoggingEnums.d.ts +2 -2
- package/types/JavaScriptSDK.Interfaces/IInstrumentHooks.d.ts +1 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
arrForEach, dumpObj, isArray, isFunction, isNullOrUndefined, isUndefined, objForEachKey, objFreeze, objKeys
|
|
7
|
-
} from "@nevware21/ts-utils";
|
|
8
|
-
import { _applyDefaultValue } from "../Config/ConfigDefaults";
|
|
9
|
-
import { createDynamicConfig } from "../Config/DynamicConfig";
|
|
10
|
-
import { IConfigDefaults } from "../Config/IConfigDefaults";
|
|
11
|
-
import { IDynamicConfigHandler } from "../Config/IDynamicConfigHandler";
|
|
12
|
-
import { _eInternalMessageId, eLoggingSeverity } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
13
|
-
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
14
|
-
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
15
|
-
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
16
|
-
import {
|
|
17
|
-
IBaseProcessingContext, IProcessTelemetryContext, IProcessTelemetryUnloadContext, IProcessTelemetryUpdateContext
|
|
18
|
-
} from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
19
|
-
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
20
|
-
import { IPlugin, ITelemetryPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
21
|
-
import { ITelemetryPluginChain } from "../JavaScriptSDK.Interfaces/ITelemetryPluginChain";
|
|
22
|
-
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
23
|
-
import { ITelemetryUpdateState } from "../JavaScriptSDK.Interfaces/ITelemetryUpdateState";
|
|
24
|
-
import { _throwInternal, safeGetLogger } from "./DiagnosticLogger";
|
|
25
|
-
import { proxyFunctions } from "./HelperFuncs";
|
|
26
|
-
import { STR_CORE, STR_DISABLED, STR_EMPTY, STR_EXTENSION_CONFIG } from "./InternalConstants";
|
|
27
|
-
import { doPerf } from "./PerfManager";
|
|
28
|
-
import { _getPluginState } from "./TelemetryHelpers";
|
|
29
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
arrForEach, dumpObj, isArray, isFunction, isNullOrUndefined, isUndefined, objForEachKey, objFreeze, objKeys
|
|
7
|
+
} from "@nevware21/ts-utils";
|
|
8
|
+
import { _applyDefaultValue } from "../Config/ConfigDefaults";
|
|
9
|
+
import { createDynamicConfig } from "../Config/DynamicConfig";
|
|
10
|
+
import { IConfigDefaults } from "../Config/IConfigDefaults";
|
|
11
|
+
import { IDynamicConfigHandler } from "../Config/IDynamicConfigHandler";
|
|
12
|
+
import { _eInternalMessageId, eLoggingSeverity } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
13
|
+
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
14
|
+
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
15
|
+
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
16
|
+
import {
|
|
17
|
+
IBaseProcessingContext, IProcessTelemetryContext, IProcessTelemetryUnloadContext, IProcessTelemetryUpdateContext
|
|
18
|
+
} from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
19
|
+
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
20
|
+
import { IPlugin, ITelemetryPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
21
|
+
import { ITelemetryPluginChain } from "../JavaScriptSDK.Interfaces/ITelemetryPluginChain";
|
|
22
|
+
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
23
|
+
import { ITelemetryUpdateState } from "../JavaScriptSDK.Interfaces/ITelemetryUpdateState";
|
|
24
|
+
import { _throwInternal, safeGetLogger } from "./DiagnosticLogger";
|
|
25
|
+
import { proxyFunctions } from "./HelperFuncs";
|
|
26
|
+
import { STR_CORE, STR_DISABLED, STR_EMPTY, STR_EXTENSION_CONFIG } from "./InternalConstants";
|
|
27
|
+
import { doPerf } from "./PerfManager";
|
|
28
|
+
import { _getPluginState } from "./TelemetryHelpers";
|
|
29
|
+
|
|
30
30
|
const strTelemetryPluginChain = "TelemetryPluginChain";
|
|
31
31
|
const strHasRunFlags = "_hasRun";
|
|
32
32
|
const strGetTelCtx = "_getTelCtx";
|
|
@@ -671,4 +671,4 @@ export class ProcessTelemetryContext implements IProcessTelemetryContext {
|
|
|
671
671
|
// Proxy all functions of the context to this object
|
|
672
672
|
proxyFunctions(_self, context, objKeys(context) as any);
|
|
673
673
|
}
|
|
674
|
-
}
|
|
674
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
import { utcNow } from "@nevware21/ts-utils";
|
|
4
|
-
import { getCrypto, getMsCrypto, isIE } from "./EnvUtils";
|
|
5
|
-
import { STR_EMPTY } from "./InternalConstants";
|
|
6
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { utcNow } from "@nevware21/ts-utils";
|
|
4
|
+
import { getCrypto, getMsCrypto, isIE } from "./EnvUtils";
|
|
5
|
+
import { STR_EMPTY } from "./InternalConstants";
|
|
6
|
+
|
|
7
7
|
const UInt32Mask = 0x100000000;
|
|
8
8
|
const MaxUInt32 = 0xffffffff;
|
|
9
9
|
|
|
@@ -142,4 +142,4 @@ export function newId(maxLength = 22): string {
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
return result;
|
|
145
|
-
}
|
|
145
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
import { arrForEach, isFunction } from "@nevware21/ts-utils";
|
|
6
|
-
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
7
|
-
import { IDistributedTraceContext } from "../JavaScriptSDK.Interfaces/IDistributedTraceContext";
|
|
8
|
-
import { IProcessTelemetryContext, IProcessTelemetryUnloadContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
9
|
-
import { IPlugin, ITelemetryPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
10
|
-
import { ITelemetryPluginChain } from "../JavaScriptSDK.Interfaces/ITelemetryPluginChain";
|
|
11
|
-
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
12
|
-
import { ITraceParent } from "../JavaScriptSDK.Interfaces/ITraceParent";
|
|
13
|
-
import { IUnloadableComponent } from "../JavaScriptSDK.Interfaces/IUnloadableComponent";
|
|
14
|
-
import { createElmNodeData } from "./DataCacheHelper";
|
|
15
|
-
import { STR_CORE, STR_PRIORITY, STR_PROCESS_TELEMETRY } from "./InternalConstants";
|
|
16
|
-
import { isValidSpanId, isValidTraceId } from "./W3cTraceParent";
|
|
17
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
import { arrForEach, isFunction } from "@nevware21/ts-utils";
|
|
6
|
+
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
7
|
+
import { IDistributedTraceContext } from "../JavaScriptSDK.Interfaces/IDistributedTraceContext";
|
|
8
|
+
import { IProcessTelemetryContext, IProcessTelemetryUnloadContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
9
|
+
import { IPlugin, ITelemetryPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
10
|
+
import { ITelemetryPluginChain } from "../JavaScriptSDK.Interfaces/ITelemetryPluginChain";
|
|
11
|
+
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
12
|
+
import { ITraceParent } from "../JavaScriptSDK.Interfaces/ITraceParent";
|
|
13
|
+
import { IUnloadableComponent } from "../JavaScriptSDK.Interfaces/IUnloadableComponent";
|
|
14
|
+
import { createElmNodeData } from "./DataCacheHelper";
|
|
15
|
+
import { STR_CORE, STR_PRIORITY, STR_PROCESS_TELEMETRY } from "./InternalConstants";
|
|
16
|
+
import { isValidSpanId, isValidTraceId } from "./W3cTraceParent";
|
|
17
|
+
|
|
18
18
|
export interface IPluginState {
|
|
19
19
|
core?: IAppInsightsCore;
|
|
20
20
|
isInitialized?: boolean;
|
|
@@ -181,4 +181,4 @@ export function createDistributedTraceContext(parentCtx?: IDistributedTraceConte
|
|
|
181
181
|
trace.traceFlags = newTraceFlags
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
|
-
}
|
|
184
|
+
}
|
|
@@ -1,18 +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 { arrForEach, dumpObj } from "@nevware21/ts-utils";
|
|
6
|
-
import { _eInternalMessageId, eLoggingSeverity } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
7
|
-
import { IProcessTelemetryContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
8
|
-
import {
|
|
9
|
-
ITelemetryInitializerContainer, ITelemetryInitializerHandler, TelemetryInitializerFunction
|
|
10
|
-
} from "../JavaScriptSDK.Interfaces/ITelemetryInitializers";
|
|
11
|
-
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
12
|
-
import { BaseTelemetryPlugin } from "./BaseTelemetryPlugin";
|
|
13
|
-
import { _throwInternal } from "./DiagnosticLogger";
|
|
14
|
-
import { getExceptionName } from "./HelperFuncs";
|
|
15
|
-
|
|
1
|
+
// // Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// // Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
5
|
+
import { arrForEach, dumpObj } from "@nevware21/ts-utils";
|
|
6
|
+
import { _eInternalMessageId, eLoggingSeverity } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
7
|
+
import { IProcessTelemetryContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
8
|
+
import {
|
|
9
|
+
ITelemetryInitializerContainer, ITelemetryInitializerHandler, TelemetryInitializerFunction
|
|
10
|
+
} from "../JavaScriptSDK.Interfaces/ITelemetryInitializers";
|
|
11
|
+
import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
12
|
+
import { BaseTelemetryPlugin } from "./BaseTelemetryPlugin";
|
|
13
|
+
import { _throwInternal } from "./DiagnosticLogger";
|
|
14
|
+
import { getExceptionName } from "./HelperFuncs";
|
|
15
|
+
|
|
16
16
|
interface _IInternalTelemetryInitializerHandler {
|
|
17
17
|
id: number;
|
|
18
18
|
fn: TelemetryInitializerFunction;
|
|
@@ -109,4 +109,4 @@ export class TelemetryInitializerPlugin extends BaseTelemetryPlugin implements I
|
|
|
109
109
|
public processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void {
|
|
110
110
|
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
111
111
|
}
|
|
112
|
-
}
|
|
112
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { arrForEach, dumpObj } from "@nevware21/ts-utils";
|
|
5
|
-
import { _eInternalMessageId, eLoggingSeverity } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
6
|
-
import { IProcessTelemetryUnloadContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
7
|
-
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
8
|
-
import { _throwInternal } from "./DiagnosticLogger";
|
|
9
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { arrForEach, dumpObj } from "@nevware21/ts-utils";
|
|
5
|
+
import { _eInternalMessageId, eLoggingSeverity } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
6
|
+
import { IProcessTelemetryUnloadContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
7
|
+
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
8
|
+
import { _throwInternal } from "./DiagnosticLogger";
|
|
9
|
+
|
|
10
10
|
export type UnloadHandler = (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
11
11
|
|
|
12
12
|
export interface IUnloadHandlerContainer {
|
|
@@ -42,4 +42,4 @@ export function createUnloadHandlerContainer(): IUnloadHandlerContainer {
|
|
|
42
42
|
add: _addHandler,
|
|
43
43
|
run: _runHandlers
|
|
44
44
|
}
|
|
45
|
-
}
|
|
45
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { isArray, isString, strLeft, strTrim } from "@nevware21/ts-utils";
|
|
2
|
-
import { ITraceParent } from "../JavaScriptSDK.Interfaces/ITraceParent";
|
|
3
|
-
import { generateW3CId } from "./CoreUtils";
|
|
4
|
-
import { findMetaTag, findNamedServerTiming } from "./EnvUtils";
|
|
5
|
-
import { STR_EMPTY } from "./InternalConstants";
|
|
6
|
-
|
|
1
|
+
import { isArray, isString, strLeft, strTrim } from "@nevware21/ts-utils";
|
|
2
|
+
import { ITraceParent } from "../JavaScriptSDK.Interfaces/ITraceParent";
|
|
3
|
+
import { generateW3CId } from "./CoreUtils";
|
|
4
|
+
import { findMetaTag, findNamedServerTiming } from "./EnvUtils";
|
|
5
|
+
import { STR_EMPTY } from "./InternalConstants";
|
|
6
|
+
|
|
7
7
|
// using {0,16} for leading and trailing whitespace just to constrain the possible runtime of a random string
|
|
8
8
|
const TRACE_PARENT_REGEX = /^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]{1,64})?$/i;
|
|
9
9
|
const DEFAULT_VERSION = "00";
|
|
@@ -194,4 +194,4 @@ export function findW3cTraceParent(): ITraceParent {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
return traceParent;
|
|
197
|
-
}
|
|
197
|
+
}
|
|
@@ -2,11 +2,11 @@ import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
|
2
2
|
/**
|
|
3
3
|
* The type to identify whether the default value should be applied in preference to the provided value.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type IConfigCheckFn<V> = (value: V) => boolean;
|
|
6
6
|
/**
|
|
7
7
|
* The type which identifies the function use to validate the user supplied value
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type IConfigSetFn<T, V> = (value: any, defValue: V, theConfig: T) => V;
|
|
10
10
|
/**
|
|
11
11
|
* The default values with a check function
|
|
12
12
|
*/
|
|
@@ -37,6 +37,6 @@ export interface IConfigDefaultCheck<T, V, C extends IConfiguration = IConfigura
|
|
|
37
37
|
* The Type definition to define default values to be applied to the config
|
|
38
38
|
* The value may be either the direct value or a ConfigDefaultCheck definition
|
|
39
39
|
*/
|
|
40
|
-
export
|
|
40
|
+
export type IConfigDefaults<T, C extends IConfiguration = IConfiguration> = {
|
|
41
41
|
[key in keyof T]: T[key] | IConfigDefaultCheck<T, T[key], C>;
|
|
42
42
|
};
|
|
@@ -35,7 +35,7 @@ export interface IWatchDetails<T extends IConfiguration> {
|
|
|
35
35
|
*/
|
|
36
36
|
rdOnly: <C, V = any>(target: C, name: string) => V;
|
|
37
37
|
}
|
|
38
|
-
export
|
|
38
|
+
export type WatcherFunction<T extends IConfiguration> = (details: IWatchDetails<T>) => void;
|
|
39
39
|
/**
|
|
40
40
|
* @internal
|
|
41
41
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IProcessTelemetryUnloadContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
2
2
|
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
3
|
-
export
|
|
3
|
+
export type UnloadHandler = (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
4
4
|
export interface IUnloadHandlerContainer {
|
|
5
5
|
add: (handler: UnloadHandler) => void;
|
|
6
6
|
run: (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
@@ -31,4 +31,4 @@ export declare const enum eEventsDiscardedReason {
|
|
|
31
31
|
* The EventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
32
32
|
*/
|
|
33
33
|
export declare const EventsDiscardedReason: import("../JavaScriptSDK.Enums/EnumHelperFuncs").EnumValue<typeof eEventsDiscardedReason>;
|
|
34
|
-
export
|
|
34
|
+
export type EventsDiscardedReason = number | eEventsDiscardedReason;
|
|
@@ -13,7 +13,7 @@ export declare const enum eLoggingSeverity {
|
|
|
13
13
|
WARNING = 2
|
|
14
14
|
}
|
|
15
15
|
export declare const LoggingSeverity: import("../JavaScriptSDK.Enums/EnumHelperFuncs").EnumValue<typeof eLoggingSeverity>;
|
|
16
|
-
export
|
|
16
|
+
export type LoggingSeverity = number | eLoggingSeverity;
|
|
17
17
|
export declare const enum _eInternalMessageId {
|
|
18
18
|
BrowserDoesNotSupportLocalStorage = 0,
|
|
19
19
|
BrowserCannotReadLocalStorage = 1,
|
|
@@ -101,4 +101,4 @@ export declare const enum _eInternalMessageId {
|
|
|
101
101
|
ConfigWatcherException = 107,
|
|
102
102
|
DynamicConfigException = 108
|
|
103
103
|
}
|
|
104
|
-
export
|
|
104
|
+
export type _InternalMessageId = number | _eInternalMessageId;
|
|
@@ -3,7 +3,7 @@ import { IUnloadHook } from "./IUnloadHook";
|
|
|
3
3
|
* A callback function that will be called for the wrapped instrumentation function
|
|
4
4
|
* before the original function is executed.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type InstrumentorHooksCallback = (funcArgs: IInstrumentCallDetails, ...orgArgs: any[]) => void;
|
|
7
7
|
/**
|
|
8
8
|
* The callbacks to call for the instrumented function, you must provide at least the request and/or response callbacks, both are not required.
|
|
9
9
|
* You must always supply the error callback
|