@microsoft/applicationinsights-core-js 3.0.3-nightly3.2305-14 → 3.0.3-nightly3.2307-24
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/es5/applicationinsights-core-js.cjs.js +221 -157
- package/browser/es5/applicationinsights-core-js.cjs.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.cjs.min.js +2 -2
- package/browser/es5/applicationinsights-core-js.cjs.min.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.gbl.js +223 -159
- package/browser/es5/applicationinsights-core-js.gbl.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.gbl.min.js +2 -2
- package/browser/es5/applicationinsights-core-js.gbl.min.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.integrity.json +25 -25
- package/browser/es5/applicationinsights-core-js.js +223 -159
- package/browser/es5/applicationinsights-core-js.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.min.js +2 -2
- package/browser/es5/applicationinsights-core-js.min.js.map +1 -1
- package/dist/es5/applicationinsights-core-js.js +221 -157
- package/dist/es5/applicationinsights-core-js.js.map +1 -1
- package/dist/es5/applicationinsights-core-js.min.js +2 -2
- package/dist/es5/applicationinsights-core-js.min.js.map +1 -1
- package/dist-es5/Config/ConfigDefaultHelpers.js +1 -1
- package/dist-es5/Config/ConfigDefaults.js +1 -1
- package/dist-es5/Config/DynamicConfig.js +1 -1
- package/dist-es5/Config/DynamicProperty.js +1 -1
- package/dist-es5/Config/DynamicState.js +1 -1
- package/dist-es5/Config/DynamicSupport.js +1 -1
- package/dist-es5/Config/IConfigDefaults.js +1 -1
- package/dist-es5/Config/IDynamicConfigHandler.js +1 -1
- package/dist-es5/Config/IDynamicPropertyHandler.js +1 -1
- package/dist-es5/Config/IDynamicWatcher.js +1 -1
- package/dist-es5/Config/_IDynamicConfigHandlerState.js +1 -1
- package/dist-es5/JavaScriptSDK/AggregationError.js +1 -1
- package/dist-es5/JavaScriptSDK/AppInsightsCore.js +5 -1
- package/dist-es5/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-es5/JavaScriptSDK/AsyncUtils.js +1 -1
- package/dist-es5/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
- package/dist-es5/JavaScriptSDK/Constants.js +1 -1
- package/dist-es5/JavaScriptSDK/CookieMgr.js +1 -1
- package/dist-es5/JavaScriptSDK/CoreUtils.js +1 -1
- package/dist-es5/JavaScriptSDK/DataCacheHelper.js +2 -2
- package/dist-es5/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-es5/JavaScriptSDK/DbgExtensionUtils.js +1 -1
- package/dist-es5/JavaScriptSDK/DiagnosticLogger.js +1 -1
- package/dist-es5/JavaScriptSDK/EnvUtils.js +43 -6
- package/dist-es5/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-es5/JavaScriptSDK/EventHelpers.js +1 -1
- package/dist-es5/JavaScriptSDK/HelperFuncs.js +1 -1
- package/dist-es5/JavaScriptSDK/InstrumentHooks.js +1 -1
- package/dist-es5/JavaScriptSDK/InternalConstants.js +1 -1
- package/dist-es5/JavaScriptSDK/NotificationManager.js +1 -1
- package/dist-es5/JavaScriptSDK/PerfManager.js +1 -1
- package/dist-es5/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
- package/dist-es5/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-es5/JavaScriptSDK/TelemetryHelpers.js +1 -1
- package/dist-es5/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
- package/dist-es5/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
- package/dist-es5/JavaScriptSDK/UnloadHookContainer.js +1 -1
- package/dist-es5/JavaScriptSDK/W3cTraceParent.js +1 -1
- package/dist-es5/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
- package/dist-es5/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-es5/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
- package/dist-es5/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-es5/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
- package/dist-es5/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IChannelControlsHost.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IUnloadHook.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/dist-es5/applicationinsights-core-js.js +2 -2
- package/dist-es5/applicationinsights-core-js.js.map +1 -1
- package/package.json +7 -5
- package/types/applicationinsights-core-js.d.ts +21 -52
- package/types/applicationinsights-core-js.namespaced.d.ts +70 -101
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 3.0.3-nightly3.
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 3.0.3-nightly3.2307-24
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -134,6 +134,10 @@ export declare function addPageShowEventListener(listener: any, excludeEvents?:
|
|
|
134
134
|
*/
|
|
135
135
|
export declare function addPageUnloadEventListener(listener: any, excludeEvents?: string[], evtNamespace?: string | string[]): boolean;
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* @group Classes
|
|
139
|
+
* @group Entrypoint
|
|
140
|
+
*/
|
|
137
141
|
export declare class AppInsightsCore<CfgType extends IConfiguration = IConfiguration> implements IAppInsightsCore<CfgType> {
|
|
138
142
|
config: CfgType;
|
|
139
143
|
logger: IDiagnosticLogger;
|
|
@@ -286,15 +290,10 @@ export declare class AppInsightsCore<CfgType extends IConfiguration = IConfigura
|
|
|
286
290
|
export declare function areCookiesSupported(logger?: IDiagnosticLogger): any;
|
|
287
291
|
|
|
288
292
|
export { arrForEach }
|
|
289
|
-
|
|
290
293
|
export { arrIndexOf }
|
|
291
|
-
|
|
292
294
|
export { arrMap }
|
|
293
|
-
|
|
294
295
|
export { arrReduce }
|
|
295
|
-
|
|
296
296
|
export { asString }
|
|
297
|
-
|
|
298
297
|
/**
|
|
299
298
|
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
300
299
|
* @param obj - Object to add the event too.
|
|
@@ -514,6 +513,8 @@ export declare function createClassFromInterface<T>(defaults?: T): new () => T;
|
|
|
514
513
|
|
|
515
514
|
export declare function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
516
515
|
|
|
516
|
+
export declare function createCustomDomEvent(eventName: string, details?: any): CustomEvent;
|
|
517
|
+
|
|
517
518
|
/**
|
|
518
519
|
* Create or return a dynamic version of the passed config, if it is not already dynamic
|
|
519
520
|
* @param config - The config to be converted into a dynamic config
|
|
@@ -576,9 +577,7 @@ export declare const createValueMap: <E, V = E>(values: {
|
|
|
576
577
|
}) => V;
|
|
577
578
|
|
|
578
579
|
export { dateNow }
|
|
579
|
-
|
|
580
580
|
export { deepFreeze }
|
|
581
|
-
|
|
582
581
|
/**
|
|
583
582
|
* Removes an event handler for the specified event
|
|
584
583
|
* @param Object - to remove the event from
|
|
@@ -646,6 +645,9 @@ export declare class DiagnosticLogger implements IDiagnosticLogger {
|
|
|
646
645
|
unload(isAsync?: boolean): void | IPromise<void>;
|
|
647
646
|
}
|
|
648
647
|
|
|
648
|
+
declare function dispatchEvent_2(target: EventTarget, evnt: Event | CustomEvent): boolean;
|
|
649
|
+
export { dispatchEvent_2 as dispatchEvent }
|
|
650
|
+
|
|
649
651
|
/**
|
|
650
652
|
* Helper function to wrap a function with a perf event
|
|
651
653
|
* @param mgrSource - The Performance Manager or a Performance provider source (may be null)
|
|
@@ -670,7 +672,6 @@ export declare function doUnloadAll<T>(targets: Array<{
|
|
|
670
672
|
}>, isAsync?: boolean, done?: () => void): void | IPromise<void>;
|
|
671
673
|
|
|
672
674
|
export { dumpObj }
|
|
673
|
-
|
|
674
675
|
/**
|
|
675
676
|
* The eEventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
676
677
|
*/
|
|
@@ -912,7 +913,6 @@ export declare function getDebugExt(config: IConfiguration): IDbgExtension;
|
|
|
912
913
|
export declare function getDebugListener(config: IConfiguration): INotificationListener;
|
|
913
914
|
|
|
914
915
|
export { getDocument }
|
|
915
|
-
|
|
916
916
|
/**
|
|
917
917
|
* @internal
|
|
918
918
|
* Get the dynamic config handler if the value is already dynamic
|
|
@@ -933,11 +933,8 @@ export declare function getExceptionName(object: any): string;
|
|
|
933
933
|
export declare function getGblPerfMgr(): IPerfManager;
|
|
934
934
|
|
|
935
935
|
export { getGlobal }
|
|
936
|
-
|
|
937
936
|
export { getGlobalInst }
|
|
938
|
-
|
|
939
937
|
export { getHistory }
|
|
940
|
-
|
|
941
938
|
/**
|
|
942
939
|
* Gets IE version returning the document emulation mode if we are running on IE, or null otherwise
|
|
943
940
|
*/
|
|
@@ -965,9 +962,7 @@ export declare function getLocation(checkForMock?: boolean): Location | null;
|
|
|
965
962
|
export declare function getMsCrypto(): Crypto | null;
|
|
966
963
|
|
|
967
964
|
export { getNavigator }
|
|
968
|
-
|
|
969
965
|
export { getPerformance }
|
|
970
|
-
|
|
971
966
|
/**
|
|
972
967
|
* Returns the current value from the target object if not null or undefined otherwise sets the new value and returns it
|
|
973
968
|
* @param target - The target object to return or set the default value
|
|
@@ -977,11 +972,8 @@ export { getPerformance }
|
|
|
977
972
|
export declare function getSetValue<T, K extends keyof T>(target: T, field: K, defValue?: T[K]): T[K];
|
|
978
973
|
|
|
979
974
|
export { getWindow }
|
|
980
|
-
|
|
981
975
|
export { hasDocument }
|
|
982
|
-
|
|
983
976
|
export { hasHistory }
|
|
984
|
-
|
|
985
977
|
/**
|
|
986
978
|
* Checks if JSON object is available, this is required as we support the API running without a
|
|
987
979
|
* window /document (eg. Node server, electron webworkers) and if we attempt to assign a history
|
|
@@ -992,11 +984,8 @@ export { hasHistory }
|
|
|
992
984
|
export declare function hasJSON(): boolean;
|
|
993
985
|
|
|
994
986
|
export { hasNavigator }
|
|
995
|
-
|
|
996
987
|
export { hasOwnProperty }
|
|
997
|
-
|
|
998
988
|
export { hasWindow }
|
|
999
|
-
|
|
1000
989
|
export declare interface IAppInsightsCore<CfgType extends IConfiguration = IConfiguration> extends IPerfManagerProvider {
|
|
1001
990
|
readonly config: CfgType;
|
|
1002
991
|
/**
|
|
@@ -1468,6 +1457,11 @@ export declare interface IConfiguration {
|
|
|
1468
1457
|
* Default is false
|
|
1469
1458
|
*/
|
|
1470
1459
|
enableWParam?: boolean;
|
|
1460
|
+
/**
|
|
1461
|
+
* Custom optional value that will be added as a prefix for storage name.
|
|
1462
|
+
* @defaultValue undefined
|
|
1463
|
+
*/
|
|
1464
|
+
storagePrefix?: string;
|
|
1471
1465
|
}
|
|
1472
1466
|
|
|
1473
1467
|
export declare interface ICookieMgr {
|
|
@@ -2269,19 +2263,17 @@ export declare interface _IRegisteredEvents {
|
|
|
2269
2263
|
}
|
|
2270
2264
|
|
|
2271
2265
|
export { isArray }
|
|
2272
|
-
|
|
2273
2266
|
/**
|
|
2274
2267
|
* Checks if HTML5 Beacons are supported in the current environment.
|
|
2268
|
+
* @param useCached - [Optional] used for testing to bypass the cached lookup, when `true` this will
|
|
2269
|
+
* cause the cached global to be reset.
|
|
2275
2270
|
* @returns True if supported, false otherwise.
|
|
2276
2271
|
*/
|
|
2277
|
-
export declare function isBeaconsSupported(): boolean;
|
|
2272
|
+
export declare function isBeaconsSupported(useCached?: boolean): boolean;
|
|
2278
2273
|
|
|
2279
2274
|
export { isBoolean }
|
|
2280
|
-
|
|
2281
2275
|
export { isDate }
|
|
2282
|
-
|
|
2283
2276
|
export { isError }
|
|
2284
|
-
|
|
2285
2277
|
/**
|
|
2286
2278
|
* Checks if the Fetch API is supported in the current environment.
|
|
2287
2279
|
* @param withKeepAlive - [Optional] If True, check if fetch is available and it supports the keepalive feature, otherwise only check if fetch is supported
|
|
@@ -2290,7 +2282,6 @@ export { isError }
|
|
|
2290
2282
|
export declare function isFetchSupported(withKeepAlive?: boolean): boolean;
|
|
2291
2283
|
|
|
2292
2284
|
export { isFunction }
|
|
2293
|
-
|
|
2294
2285
|
/**
|
|
2295
2286
|
* Identifies whether the current environment appears to be IE
|
|
2296
2287
|
*/
|
|
@@ -2299,15 +2290,11 @@ export declare function isIE(): boolean;
|
|
|
2299
2290
|
export declare function isNotNullOrUndefined<T>(value: T): value is T;
|
|
2300
2291
|
|
|
2301
2292
|
export { isNotTruthy }
|
|
2302
|
-
|
|
2303
2293
|
export declare function isNotUndefined<T>(value: T): value is T;
|
|
2304
2294
|
|
|
2305
2295
|
export { isNullOrUndefined }
|
|
2306
|
-
|
|
2307
2296
|
export { isNumber }
|
|
2308
|
-
|
|
2309
2297
|
export { isObject }
|
|
2310
|
-
|
|
2311
2298
|
/**
|
|
2312
2299
|
* Returns whether the environment is reporting that we are running in a React Native Environment
|
|
2313
2300
|
*/
|
|
@@ -2323,15 +2310,10 @@ export declare function isSafari(userAgentStr?: string): boolean;
|
|
|
2323
2310
|
export declare function isSampledFlag(value: ITraceParent): boolean;
|
|
2324
2311
|
|
|
2325
2312
|
export { isString }
|
|
2326
|
-
|
|
2327
2313
|
export { isSymbol }
|
|
2328
|
-
|
|
2329
2314
|
export { isTruthy }
|
|
2330
|
-
|
|
2331
2315
|
export { isTypeof }
|
|
2332
|
-
|
|
2333
2316
|
export { isUndefined }
|
|
2334
|
-
|
|
2335
2317
|
/**
|
|
2336
2318
|
* Is the provided W3c span id (aka. parent id) a valid string representation, it must be a 16-character
|
|
2337
2319
|
* string of lowercase hexadecimal characters, for example, 00f067aa0ba902b7.
|
|
@@ -2724,7 +2706,6 @@ export declare class NotificationManager implements INotificationManager {
|
|
|
2724
2706
|
}
|
|
2725
2707
|
|
|
2726
2708
|
export { objDefineAccessors }
|
|
2727
|
-
|
|
2728
2709
|
/**
|
|
2729
2710
|
* Pass in the objects to merge as arguments, this will only "merge" (extend) properties that are owned by the object.
|
|
2730
2711
|
* It will NOT merge inherited or non-enumerable properties.
|
|
@@ -2740,15 +2721,10 @@ export declare function objExtend<T2, T3, T4, T5, T6>(deepExtend?: boolean, obj2
|
|
|
2740
2721
|
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;
|
|
2741
2722
|
|
|
2742
2723
|
export { objForEachKey }
|
|
2743
|
-
|
|
2744
2724
|
export { objFreeze }
|
|
2745
|
-
|
|
2746
2725
|
export { objKeys }
|
|
2747
|
-
|
|
2748
2726
|
export { objSeal }
|
|
2749
|
-
|
|
2750
2727
|
export { objToString }
|
|
2751
|
-
|
|
2752
2728
|
/**
|
|
2753
2729
|
* Watch and track changes for accesses to the current config, the provided config MUST already be
|
|
2754
2730
|
* a dynamic config or a child accessed via the dynamic config
|
|
@@ -2822,7 +2798,7 @@ export declare class PerfManager implements IPerfManager {
|
|
|
2822
2798
|
* General bucket used for execution context set and retrieved via setCtx() and getCtx.
|
|
2823
2799
|
* Defined as private so it can be visualized via the DebugPlugin
|
|
2824
2800
|
*/
|
|
2825
|
-
private ctx;
|
|
2801
|
+
// private ctx;
|
|
2826
2802
|
constructor(manager?: INotificationManager);
|
|
2827
2803
|
/**
|
|
2828
2804
|
* Create a new event and start timing, the manager may return null/undefined to indicate that it does not
|
|
@@ -2851,7 +2827,6 @@ export declare class PerfManager implements IPerfManager {
|
|
|
2851
2827
|
}
|
|
2852
2828
|
|
|
2853
2829
|
export { perfNow }
|
|
2854
|
-
|
|
2855
2830
|
/**
|
|
2856
2831
|
* This class will be removed!
|
|
2857
2832
|
* @deprecated use createProcessTelemetryContext() instead
|
|
@@ -3040,6 +3015,8 @@ export declare function safeGetCookieMgr(core: IAppInsightsCore, config?: IConfi
|
|
|
3040
3015
|
|
|
3041
3016
|
export declare function safeGetLogger(core: IAppInsightsCore, config?: IConfiguration): IDiagnosticLogger;
|
|
3042
3017
|
|
|
3018
|
+
export declare function sendCustomEvent(evtName: string, cfg?: any, customDetails?: any): boolean;
|
|
3019
|
+
|
|
3043
3020
|
/**
|
|
3044
3021
|
* The EventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
3045
3022
|
*/
|
|
@@ -3120,19 +3097,12 @@ export declare function sortPlugins<T = IPlugin>(plugins: T[]): T[];
|
|
|
3120
3097
|
export declare function strContains(value: string, search: string): boolean;
|
|
3121
3098
|
|
|
3122
3099
|
export { strEndsWith }
|
|
3123
|
-
|
|
3124
3100
|
export { strFunction }
|
|
3125
|
-
|
|
3126
3101
|
export { strObject }
|
|
3127
|
-
|
|
3128
3102
|
export { strPrototype }
|
|
3129
|
-
|
|
3130
3103
|
export { strStartsWith }
|
|
3131
|
-
|
|
3132
3104
|
export { strTrim }
|
|
3133
|
-
|
|
3134
3105
|
export { strUndefined }
|
|
3135
|
-
|
|
3136
3106
|
export declare interface Tags {
|
|
3137
3107
|
[key: string]: any;
|
|
3138
3108
|
}
|
|
@@ -3191,7 +3161,6 @@ export declare const enum TelemetryUpdateReason {
|
|
|
3191
3161
|
export declare function throwAggregationError(message: string, sourceErrors: any[]): never;
|
|
3192
3162
|
|
|
3193
3163
|
export { throwError }
|
|
3194
|
-
|
|
3195
3164
|
/**
|
|
3196
3165
|
* This is a helper method which will call throwInternal on the passed logger, will throw exceptions in
|
|
3197
3166
|
* debug mode or attempt to log the error as a console warning. This helper is provided mostly to better
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 3.0.3-nightly3.
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 3.0.3-nightly3.2307-24
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -129,6 +129,10 @@ declare namespace ApplicationInsights {
|
|
|
129
129
|
*/
|
|
130
130
|
function addPageUnloadEventListener(listener: any, excludeEvents?: string[], evtNamespace?: string | string[]): boolean;
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* @group Classes
|
|
134
|
+
* @group Entrypoint
|
|
135
|
+
*/
|
|
132
136
|
class AppInsightsCore<CfgType extends IConfiguration = IConfiguration> implements IAppInsightsCore<CfgType> {
|
|
133
137
|
config: CfgType;
|
|
134
138
|
logger: IDiagnosticLogger;
|
|
@@ -280,16 +284,11 @@ declare namespace ApplicationInsights {
|
|
|
280
284
|
|
|
281
285
|
function areCookiesSupported(logger?: IDiagnosticLogger): any;
|
|
282
286
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
export { arrReduce }
|
|
290
|
-
|
|
291
|
-
export { asString }
|
|
292
|
-
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
293
292
|
/**
|
|
294
293
|
* Binds the specified function to an event, so that the function gets called whenever the event fires on the object
|
|
295
294
|
* @param obj - Object to add the event too.
|
|
@@ -509,6 +508,8 @@ declare namespace ApplicationInsights {
|
|
|
509
508
|
|
|
510
509
|
function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
511
510
|
|
|
511
|
+
function createCustomDomEvent(eventName: string, details?: any): CustomEvent;
|
|
512
|
+
|
|
512
513
|
/**
|
|
513
514
|
* Create or return a dynamic version of the passed config, if it is not already dynamic
|
|
514
515
|
* @param config - The config to be converted into a dynamic config
|
|
@@ -570,10 +571,8 @@ declare namespace ApplicationInsights {
|
|
|
570
571
|
[key in keyof E]: [E[keyof E], V[keyof V]];
|
|
571
572
|
}) => V;
|
|
572
573
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
export { deepFreeze }
|
|
576
|
-
|
|
574
|
+
|
|
575
|
+
|
|
577
576
|
/**
|
|
578
577
|
* Removes an event handler for the specified event
|
|
579
578
|
* @param Object - to remove the event from
|
|
@@ -641,6 +640,9 @@ declare namespace ApplicationInsights {
|
|
|
641
640
|
unload(isAsync?: boolean): void | IPromise<void>;
|
|
642
641
|
}
|
|
643
642
|
|
|
643
|
+
function dispatchEvent_2(target: EventTarget, evnt: Event | CustomEvent): boolean;
|
|
644
|
+
const dispatchEvent: typeof dispatchEvent_2;
|
|
645
|
+
|
|
644
646
|
/**
|
|
645
647
|
* Helper function to wrap a function with a perf event
|
|
646
648
|
* @param mgrSource - The Performance Manager or a Performance provider source (may be null)
|
|
@@ -664,8 +666,7 @@ declare namespace ApplicationInsights {
|
|
|
664
666
|
unload?: (isAsync?: boolean) => T | IPromise<T>;
|
|
665
667
|
}>, isAsync?: boolean, done?: () => void): void | IPromise<void>;
|
|
666
668
|
|
|
667
|
-
|
|
668
|
-
|
|
669
|
+
|
|
669
670
|
/**
|
|
670
671
|
* The eEventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
671
672
|
*/
|
|
@@ -906,8 +907,7 @@ declare namespace ApplicationInsights {
|
|
|
906
907
|
|
|
907
908
|
function getDebugListener(config: IConfiguration): INotificationListener;
|
|
908
909
|
|
|
909
|
-
|
|
910
|
-
|
|
910
|
+
|
|
911
911
|
/**
|
|
912
912
|
* @internal
|
|
913
913
|
* Get the dynamic config handler if the value is already dynamic
|
|
@@ -927,12 +927,9 @@ declare namespace ApplicationInsights {
|
|
|
927
927
|
*/
|
|
928
928
|
function getGblPerfMgr(): IPerfManager;
|
|
929
929
|
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
export { getHistory }
|
|
935
|
-
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
|
|
936
933
|
/**
|
|
937
934
|
* Gets IE version returning the document emulation mode if we are running on IE, or null otherwise
|
|
938
935
|
*/
|
|
@@ -959,10 +956,8 @@ declare namespace ApplicationInsights {
|
|
|
959
956
|
*/
|
|
960
957
|
function getMsCrypto(): Crypto | null;
|
|
961
958
|
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
export { getPerformance }
|
|
965
|
-
|
|
959
|
+
|
|
960
|
+
|
|
966
961
|
/**
|
|
967
962
|
* Returns the current value from the target object if not null or undefined otherwise sets the new value and returns it
|
|
968
963
|
* @param target - The target object to return or set the default value
|
|
@@ -971,12 +966,9 @@ declare namespace ApplicationInsights {
|
|
|
971
966
|
*/
|
|
972
967
|
function getSetValue<T, K extends keyof T>(target: T, field: K, defValue?: T[K]): T[K];
|
|
973
968
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
export { hasHistory }
|
|
979
|
-
|
|
969
|
+
|
|
970
|
+
|
|
971
|
+
|
|
980
972
|
/**
|
|
981
973
|
* Checks if JSON object is available, this is required as we support the API running without a
|
|
982
974
|
* window /document (eg. Node server, electron webworkers) and if we attempt to assign a history
|
|
@@ -986,12 +978,9 @@ declare namespace ApplicationInsights {
|
|
|
986
978
|
*/
|
|
987
979
|
function hasJSON(): boolean;
|
|
988
980
|
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
export { hasWindow }
|
|
994
|
-
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
|
|
995
984
|
interface IAppInsightsCore<CfgType extends IConfiguration = IConfiguration> extends IPerfManagerProvider {
|
|
996
985
|
readonly config: CfgType;
|
|
997
986
|
/**
|
|
@@ -1463,6 +1452,11 @@ declare namespace ApplicationInsights {
|
|
|
1463
1452
|
* Default is false
|
|
1464
1453
|
*/
|
|
1465
1454
|
enableWParam?: boolean;
|
|
1455
|
+
/**
|
|
1456
|
+
* Custom optional value that will be added as a prefix for storage name.
|
|
1457
|
+
* @defaultValue undefined
|
|
1458
|
+
*/
|
|
1459
|
+
storagePrefix?: string;
|
|
1466
1460
|
}
|
|
1467
1461
|
|
|
1468
1462
|
interface ICookieMgr {
|
|
@@ -2263,20 +2257,18 @@ declare namespace ApplicationInsights {
|
|
|
2263
2257
|
handler: any;
|
|
2264
2258
|
}
|
|
2265
2259
|
|
|
2266
|
-
|
|
2267
|
-
|
|
2260
|
+
|
|
2268
2261
|
/**
|
|
2269
2262
|
* Checks if HTML5 Beacons are supported in the current environment.
|
|
2263
|
+
* @param useCached - [Optional] used for testing to bypass the cached lookup, when `true` this will
|
|
2264
|
+
* cause the cached global to be reset.
|
|
2270
2265
|
* @returns True if supported, false otherwise.
|
|
2271
2266
|
*/
|
|
2272
|
-
function isBeaconsSupported(): boolean;
|
|
2273
|
-
|
|
2274
|
-
export { isBoolean }
|
|
2275
|
-
|
|
2276
|
-
export { isDate }
|
|
2277
|
-
|
|
2278
|
-
export { isError }
|
|
2267
|
+
function isBeaconsSupported(useCached?: boolean): boolean;
|
|
2279
2268
|
|
|
2269
|
+
|
|
2270
|
+
|
|
2271
|
+
|
|
2280
2272
|
/**
|
|
2281
2273
|
* Checks if the Fetch API is supported in the current environment.
|
|
2282
2274
|
* @param withKeepAlive - [Optional] If True, check if fetch is available and it supports the keepalive feature, otherwise only check if fetch is supported
|
|
@@ -2284,8 +2276,7 @@ declare namespace ApplicationInsights {
|
|
|
2284
2276
|
*/
|
|
2285
2277
|
function isFetchSupported(withKeepAlive?: boolean): boolean;
|
|
2286
2278
|
|
|
2287
|
-
|
|
2288
|
-
|
|
2279
|
+
|
|
2289
2280
|
/**
|
|
2290
2281
|
* Identifies whether the current environment appears to be IE
|
|
2291
2282
|
*/
|
|
@@ -2293,16 +2284,12 @@ declare namespace ApplicationInsights {
|
|
|
2293
2284
|
|
|
2294
2285
|
function isNotNullOrUndefined<T>(value: T): value is T;
|
|
2295
2286
|
|
|
2296
|
-
|
|
2297
|
-
|
|
2287
|
+
|
|
2298
2288
|
function isNotUndefined<T>(value: T): value is T;
|
|
2299
2289
|
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
export { isObject }
|
|
2305
|
-
|
|
2290
|
+
|
|
2291
|
+
|
|
2292
|
+
|
|
2306
2293
|
/**
|
|
2307
2294
|
* Returns whether the environment is reporting that we are running in a React Native Environment
|
|
2308
2295
|
*/
|
|
@@ -2317,16 +2304,11 @@ declare namespace ApplicationInsights {
|
|
|
2317
2304
|
*/
|
|
2318
2305
|
function isSampledFlag(value: ITraceParent): boolean;
|
|
2319
2306
|
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
export { isTypeof }
|
|
2327
|
-
|
|
2328
|
-
export { isUndefined }
|
|
2329
|
-
|
|
2307
|
+
|
|
2308
|
+
|
|
2309
|
+
|
|
2310
|
+
|
|
2311
|
+
|
|
2330
2312
|
/**
|
|
2331
2313
|
* Is the provided W3c span id (aka. parent id) a valid string representation, it must be a 16-character
|
|
2332
2314
|
* string of lowercase hexadecimal characters, for example, 00f067aa0ba902b7.
|
|
@@ -2718,8 +2700,7 @@ declare namespace ApplicationInsights {
|
|
|
2718
2700
|
unload?(isAsync?: boolean): void | IPromise<void>;
|
|
2719
2701
|
}
|
|
2720
2702
|
|
|
2721
|
-
|
|
2722
|
-
|
|
2703
|
+
|
|
2723
2704
|
/**
|
|
2724
2705
|
* Pass in the objects to merge as arguments, this will only "merge" (extend) properties that are owned by the object.
|
|
2725
2706
|
* It will NOT merge inherited or non-enumerable properties.
|
|
@@ -2734,16 +2715,11 @@ declare namespace ApplicationInsights {
|
|
|
2734
2715
|
|
|
2735
2716
|
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;
|
|
2736
2717
|
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
export { objSeal }
|
|
2744
|
-
|
|
2745
|
-
export { objToString }
|
|
2746
|
-
|
|
2718
|
+
|
|
2719
|
+
|
|
2720
|
+
|
|
2721
|
+
|
|
2722
|
+
|
|
2747
2723
|
/**
|
|
2748
2724
|
* Watch and track changes for accesses to the current config, the provided config MUST already be
|
|
2749
2725
|
* a dynamic config or a child accessed via the dynamic config
|
|
@@ -2817,7 +2793,7 @@ declare namespace ApplicationInsights {
|
|
|
2817
2793
|
* General bucket used for execution context set and retrieved via setCtx() and getCtx.
|
|
2818
2794
|
* Defined as private so it can be visualized via the DebugPlugin
|
|
2819
2795
|
*/
|
|
2820
|
-
private ctx;
|
|
2796
|
+
// private ctx;
|
|
2821
2797
|
constructor(manager?: INotificationManager);
|
|
2822
2798
|
/**
|
|
2823
2799
|
* Create a new event and start timing, the manager may return null/undefined to indicate that it does not
|
|
@@ -2845,8 +2821,7 @@ declare namespace ApplicationInsights {
|
|
|
2845
2821
|
getCtx(key: string): any;
|
|
2846
2822
|
}
|
|
2847
2823
|
|
|
2848
|
-
|
|
2849
|
-
|
|
2824
|
+
|
|
2850
2825
|
/**
|
|
2851
2826
|
* This class will be removed!
|
|
2852
2827
|
* @deprecated use createProcessTelemetryContext() instead
|
|
@@ -3035,6 +3010,8 @@ declare namespace ApplicationInsights {
|
|
|
3035
3010
|
|
|
3036
3011
|
function safeGetLogger(core: IAppInsightsCore, config?: IConfiguration): IDiagnosticLogger;
|
|
3037
3012
|
|
|
3013
|
+
function sendCustomEvent(evtName: string, cfg?: any, customDetails?: any): boolean;
|
|
3014
|
+
|
|
3038
3015
|
/**
|
|
3039
3016
|
* The EventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
3040
3017
|
*/
|
|
@@ -3114,20 +3091,13 @@ declare namespace ApplicationInsights {
|
|
|
3114
3091
|
*/
|
|
3115
3092
|
function strContains(value: string, search: string): boolean;
|
|
3116
3093
|
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
export { strStartsWith }
|
|
3126
|
-
|
|
3127
|
-
export { strTrim }
|
|
3128
|
-
|
|
3129
|
-
export { strUndefined }
|
|
3130
|
-
|
|
3094
|
+
|
|
3095
|
+
|
|
3096
|
+
|
|
3097
|
+
|
|
3098
|
+
|
|
3099
|
+
|
|
3100
|
+
|
|
3131
3101
|
interface Tags {
|
|
3132
3102
|
[key: string]: any;
|
|
3133
3103
|
}
|
|
@@ -3185,8 +3155,7 @@ declare namespace ApplicationInsights {
|
|
|
3185
3155
|
*/
|
|
3186
3156
|
function throwAggregationError(message: string, sourceErrors: any[]): never;
|
|
3187
3157
|
|
|
3188
|
-
|
|
3189
|
-
|
|
3158
|
+
|
|
3190
3159
|
/**
|
|
3191
3160
|
* This is a helper method which will call throwInternal on the passed logger, will throw exceptions in
|
|
3192
3161
|
* debug mode or attempt to log the error as a console warning. This helper is provided mostly to better
|