@microsoft/applicationinsights-core-js 2.7.0-beta.1 → 2.7.1-nightly.202110-04
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 +110 -17
- 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 +182 -1
- package/dist/applicationinsights-core-js.api.md +15 -0
- package/dist/applicationinsights-core-js.d.ts +27 -1
- package/dist/applicationinsights-core-js.js +110 -17
- 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 +27 -1
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +21 -3
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +3 -3
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +2 -2
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +1 -2
- package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
- package/dist-esm/JavaScriptSDK/Constants.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +2 -2
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +86 -3
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +27 -17
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -2
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +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 +2 -2
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js +4 -3
- package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js.map +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 -2
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js.map +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/IDiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/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/applicationinsights-core-js.js +2 -2
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +70 -70
- package/src/JavaScriptSDK/AppInsightsCore.ts +27 -6
- package/src/JavaScriptSDK/BaseCore.ts +3 -3
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +4 -4
- package/src/JavaScriptSDK/ChannelController.ts +3 -3
- package/src/JavaScriptSDK/CookieMgr.ts +6 -6
- package/src/JavaScriptSDK/CoreUtils.ts +20 -20
- package/src/JavaScriptSDK/DiagnosticLogger.ts +1 -2
- package/src/JavaScriptSDK/EnvUtils.ts +115 -21
- package/src/JavaScriptSDK/HelperFuncs.ts +41 -29
- package/src/JavaScriptSDK/InstrumentHooks.ts +1 -1
- package/src/JavaScriptSDK/NotificationManager.ts +1 -1
- package/src/JavaScriptSDK/PerfManager.ts +8 -8
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +1 -1
- package/src/JavaScriptSDK/RandomHelper.ts +1 -1
- package/src/JavaScriptSDK/TelemetryHelpers.ts +4 -4
- package/src/JavaScriptSDK/TelemetryPluginChain.ts +4 -3
- package/src/JavaScriptSDK.Enums/EventsDiscardedReason.ts +1 -1
- package/src/JavaScriptSDK.Enums/SendRequestReason.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/IAppInsightsCore.ts +3 -1
- package/src/JavaScriptSDK.Interfaces/IChannelControls.ts +2 -2
- package/src/JavaScriptSDK.Interfaces/IConfiguration.ts +6 -6
- package/src/JavaScriptSDK.Interfaces/ICookieMgr.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/IInstrumentHooks.ts +2 -2
- package/src/JavaScriptSDK.Interfaces/INotificationListener.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/INotificationManager.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/IPerfEvent.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/IPerfManager.ts +2 -2
- package/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/ITelemetryItem.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +4 -4
- package/src/JavaScriptSDK.Interfaces/ITelemetryPluginChain.ts +1 -1
- package/types/JavaScriptSDK/AppInsightsCore.d.ts +4 -0
- package/types/JavaScriptSDK/EnvUtils.d.ts +17 -0
- package/types/JavaScriptSDK.Interfaces/IAppInsightsCore.d.ts +1 -0
- package/types/applicationinsights-core-js.d.ts +1 -1
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
-
"toolVersion": "7.18.
|
|
4
|
+
"toolVersion": "7.18.11",
|
|
5
5
|
"schemaVersion": 1004,
|
|
6
6
|
"oldestForwardsCompatibleVersion": 1001,
|
|
7
7
|
"tsdocConfig": {
|
|
@@ -798,6 +798,35 @@
|
|
|
798
798
|
],
|
|
799
799
|
"name": "removeNotificationListener"
|
|
800
800
|
},
|
|
801
|
+
{
|
|
802
|
+
"kind": "Method",
|
|
803
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!AppInsightsCore#stopPollingInternalLogs:member(1)",
|
|
804
|
+
"docComment": "/**\n * Periodically check logger.queue for\n */\n",
|
|
805
|
+
"excerptTokens": [
|
|
806
|
+
{
|
|
807
|
+
"kind": "Content",
|
|
808
|
+
"text": "stopPollingInternalLogs(): "
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
"kind": "Content",
|
|
812
|
+
"text": "void"
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
"kind": "Content",
|
|
816
|
+
"text": ";"
|
|
817
|
+
}
|
|
818
|
+
],
|
|
819
|
+
"isOptional": false,
|
|
820
|
+
"isStatic": false,
|
|
821
|
+
"returnTypeTokenRange": {
|
|
822
|
+
"startIndex": 1,
|
|
823
|
+
"endIndex": 2
|
|
824
|
+
},
|
|
825
|
+
"releaseTag": "Public",
|
|
826
|
+
"overloadIndex": 1,
|
|
827
|
+
"parameters": [],
|
|
828
|
+
"name": "stopPollingInternalLogs"
|
|
829
|
+
},
|
|
801
830
|
{
|
|
802
831
|
"kind": "Method",
|
|
803
832
|
"canonicalReference": "@microsoft/applicationinsights-core-js!AppInsightsCore#track:member(1)",
|
|
@@ -5001,6 +5030,34 @@
|
|
|
5001
5030
|
],
|
|
5002
5031
|
"name": "setCookieMgr"
|
|
5003
5032
|
},
|
|
5033
|
+
{
|
|
5034
|
+
"kind": "MethodSignature",
|
|
5035
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!IAppInsightsCore#stopPollingInternalLogs:member(1)",
|
|
5036
|
+
"docComment": "",
|
|
5037
|
+
"excerptTokens": [
|
|
5038
|
+
{
|
|
5039
|
+
"kind": "Content",
|
|
5040
|
+
"text": "stopPollingInternalLogs?(): "
|
|
5041
|
+
},
|
|
5042
|
+
{
|
|
5043
|
+
"kind": "Content",
|
|
5044
|
+
"text": "void"
|
|
5045
|
+
},
|
|
5046
|
+
{
|
|
5047
|
+
"kind": "Content",
|
|
5048
|
+
"text": ";"
|
|
5049
|
+
}
|
|
5050
|
+
],
|
|
5051
|
+
"isOptional": true,
|
|
5052
|
+
"returnTypeTokenRange": {
|
|
5053
|
+
"startIndex": 1,
|
|
5054
|
+
"endIndex": 2
|
|
5055
|
+
},
|
|
5056
|
+
"releaseTag": "Public",
|
|
5057
|
+
"overloadIndex": 1,
|
|
5058
|
+
"parameters": [],
|
|
5059
|
+
"name": "stopPollingInternalLogs"
|
|
5060
|
+
},
|
|
5004
5061
|
{
|
|
5005
5062
|
"kind": "MethodSignature",
|
|
5006
5063
|
"canonicalReference": "@microsoft/applicationinsights-core-js!IAppInsightsCore#track:member(1)",
|
|
@@ -10562,6 +10619,33 @@
|
|
|
10562
10619
|
],
|
|
10563
10620
|
"name": "isArray"
|
|
10564
10621
|
},
|
|
10622
|
+
{
|
|
10623
|
+
"kind": "Function",
|
|
10624
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!isBeaconsSupported:function(1)",
|
|
10625
|
+
"docComment": "/**\n * Checks if HTML5 Beacons are supported in the current environment.\n *\n * @returns True if supported, false otherwise.\n */\n",
|
|
10626
|
+
"excerptTokens": [
|
|
10627
|
+
{
|
|
10628
|
+
"kind": "Content",
|
|
10629
|
+
"text": "export declare function isBeaconsSupported(): "
|
|
10630
|
+
},
|
|
10631
|
+
{
|
|
10632
|
+
"kind": "Content",
|
|
10633
|
+
"text": "boolean"
|
|
10634
|
+
},
|
|
10635
|
+
{
|
|
10636
|
+
"kind": "Content",
|
|
10637
|
+
"text": ";"
|
|
10638
|
+
}
|
|
10639
|
+
],
|
|
10640
|
+
"returnTypeTokenRange": {
|
|
10641
|
+
"startIndex": 1,
|
|
10642
|
+
"endIndex": 2
|
|
10643
|
+
},
|
|
10644
|
+
"releaseTag": "Public",
|
|
10645
|
+
"overloadIndex": 1,
|
|
10646
|
+
"parameters": [],
|
|
10647
|
+
"name": "isBeaconsSupported"
|
|
10648
|
+
},
|
|
10565
10649
|
{
|
|
10566
10650
|
"kind": "Function",
|
|
10567
10651
|
"canonicalReference": "@microsoft/applicationinsights-core-js!isBoolean:function(1)",
|
|
@@ -10716,6 +10800,49 @@
|
|
|
10716
10800
|
],
|
|
10717
10801
|
"name": "isError"
|
|
10718
10802
|
},
|
|
10803
|
+
{
|
|
10804
|
+
"kind": "Function",
|
|
10805
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!isFetchSupported:function(1)",
|
|
10806
|
+
"docComment": "/**\n * Checks if the Fetch API is supported in the current environment.\n *\n * @param withKeepAlive - [Optional] If True, check if fetch is available and it supports the keepalive feature, otherwise only check if fetch is supported\n *\n * @returns True if supported, otherwise false\n */\n",
|
|
10807
|
+
"excerptTokens": [
|
|
10808
|
+
{
|
|
10809
|
+
"kind": "Content",
|
|
10810
|
+
"text": "export declare function isFetchSupported(withKeepAlive?: "
|
|
10811
|
+
},
|
|
10812
|
+
{
|
|
10813
|
+
"kind": "Content",
|
|
10814
|
+
"text": "boolean"
|
|
10815
|
+
},
|
|
10816
|
+
{
|
|
10817
|
+
"kind": "Content",
|
|
10818
|
+
"text": "): "
|
|
10819
|
+
},
|
|
10820
|
+
{
|
|
10821
|
+
"kind": "Content",
|
|
10822
|
+
"text": "boolean"
|
|
10823
|
+
},
|
|
10824
|
+
{
|
|
10825
|
+
"kind": "Content",
|
|
10826
|
+
"text": ";"
|
|
10827
|
+
}
|
|
10828
|
+
],
|
|
10829
|
+
"returnTypeTokenRange": {
|
|
10830
|
+
"startIndex": 3,
|
|
10831
|
+
"endIndex": 4
|
|
10832
|
+
},
|
|
10833
|
+
"releaseTag": "Public",
|
|
10834
|
+
"overloadIndex": 1,
|
|
10835
|
+
"parameters": [
|
|
10836
|
+
{
|
|
10837
|
+
"parameterName": "withKeepAlive",
|
|
10838
|
+
"parameterTypeTokenRange": {
|
|
10839
|
+
"startIndex": 1,
|
|
10840
|
+
"endIndex": 2
|
|
10841
|
+
}
|
|
10842
|
+
}
|
|
10843
|
+
],
|
|
10844
|
+
"name": "isFetchSupported"
|
|
10845
|
+
},
|
|
10719
10846
|
{
|
|
10720
10847
|
"kind": "Function",
|
|
10721
10848
|
"canonicalReference": "@microsoft/applicationinsights-core-js!isFunction:function(1)",
|
|
@@ -11364,6 +11491,33 @@
|
|
|
11364
11491
|
],
|
|
11365
11492
|
"name": "isUndefined"
|
|
11366
11493
|
},
|
|
11494
|
+
{
|
|
11495
|
+
"kind": "Function",
|
|
11496
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!isXhrSupported:function(1)",
|
|
11497
|
+
"docComment": "/**\n * Checks if XMLHttpRequest is supported\n *\n * @returns True if supported, otherwise false\n */\n",
|
|
11498
|
+
"excerptTokens": [
|
|
11499
|
+
{
|
|
11500
|
+
"kind": "Content",
|
|
11501
|
+
"text": "export declare function isXhrSupported(): "
|
|
11502
|
+
},
|
|
11503
|
+
{
|
|
11504
|
+
"kind": "Content",
|
|
11505
|
+
"text": "boolean"
|
|
11506
|
+
},
|
|
11507
|
+
{
|
|
11508
|
+
"kind": "Content",
|
|
11509
|
+
"text": ";"
|
|
11510
|
+
}
|
|
11511
|
+
],
|
|
11512
|
+
"returnTypeTokenRange": {
|
|
11513
|
+
"startIndex": 1,
|
|
11514
|
+
"endIndex": 2
|
|
11515
|
+
},
|
|
11516
|
+
"releaseTag": "Public",
|
|
11517
|
+
"overloadIndex": 1,
|
|
11518
|
+
"parameters": [],
|
|
11519
|
+
"name": "isXhrSupported"
|
|
11520
|
+
},
|
|
11367
11521
|
{
|
|
11368
11522
|
"kind": "Interface",
|
|
11369
11523
|
"canonicalReference": "@microsoft/applicationinsights-core-js!ITelemetryItem:interface",
|
|
@@ -15443,6 +15597,33 @@
|
|
|
15443
15597
|
"startIndex": 0,
|
|
15444
15598
|
"endIndex": 0
|
|
15445
15599
|
}
|
|
15600
|
+
},
|
|
15601
|
+
{
|
|
15602
|
+
"kind": "Function",
|
|
15603
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!useXDomainRequest:function(1)",
|
|
15604
|
+
"docComment": "",
|
|
15605
|
+
"excerptTokens": [
|
|
15606
|
+
{
|
|
15607
|
+
"kind": "Content",
|
|
15608
|
+
"text": "export declare function useXDomainRequest(): "
|
|
15609
|
+
},
|
|
15610
|
+
{
|
|
15611
|
+
"kind": "Content",
|
|
15612
|
+
"text": "boolean | undefined"
|
|
15613
|
+
},
|
|
15614
|
+
{
|
|
15615
|
+
"kind": "Content",
|
|
15616
|
+
"text": ";"
|
|
15617
|
+
}
|
|
15618
|
+
],
|
|
15619
|
+
"returnTypeTokenRange": {
|
|
15620
|
+
"startIndex": 1,
|
|
15621
|
+
"endIndex": 2
|
|
15622
|
+
},
|
|
15623
|
+
"releaseTag": "Public",
|
|
15624
|
+
"overloadIndex": 1,
|
|
15625
|
+
"parameters": [],
|
|
15626
|
+
"name": "useXDomainRequest"
|
|
15446
15627
|
}
|
|
15447
15628
|
]
|
|
15448
15629
|
}
|
|
@@ -22,6 +22,7 @@ export class AppInsightsCore extends BaseCore implements IAppInsightsCore {
|
|
|
22
22
|
initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
|
|
23
23
|
pollInternalLogs(eventName?: string): number;
|
|
24
24
|
removeNotificationListener(listener: INotificationListener): void;
|
|
25
|
+
stopPollingInternalLogs(): void;
|
|
25
26
|
// (undocumented)
|
|
26
27
|
track(telemetryItem: ITelemetryItem): void;
|
|
27
28
|
}
|
|
@@ -251,6 +252,8 @@ export interface IAppInsightsCore extends IPerfManagerProvider {
|
|
|
251
252
|
removeNotificationListener?(listener: INotificationListener): void;
|
|
252
253
|
setCookieMgr(cookieMgr: ICookieMgr): void;
|
|
253
254
|
// (undocumented)
|
|
255
|
+
stopPollingInternalLogs?(): void;
|
|
256
|
+
// (undocumented)
|
|
254
257
|
track(telemetryItem: ITelemetryItem): void;
|
|
255
258
|
}
|
|
256
259
|
|
|
@@ -614,6 +617,9 @@ export interface IProcessTelemetryContext {
|
|
|
614
617
|
// @public
|
|
615
618
|
export function isArray(obj: any): boolean;
|
|
616
619
|
|
|
620
|
+
// @public
|
|
621
|
+
export function isBeaconsSupported(): boolean;
|
|
622
|
+
|
|
617
623
|
// @public
|
|
618
624
|
export function isBoolean(value: any): value is boolean;
|
|
619
625
|
|
|
@@ -623,6 +629,9 @@ export function isDate(obj: any): obj is Date;
|
|
|
623
629
|
// @public
|
|
624
630
|
export function isError(obj: any): obj is Error;
|
|
625
631
|
|
|
632
|
+
// @public
|
|
633
|
+
export function isFetchSupported(withKeepAlive?: boolean): boolean;
|
|
634
|
+
|
|
626
635
|
// @public (undocumented)
|
|
627
636
|
export function isFunction(value: any): value is Function;
|
|
628
637
|
|
|
@@ -668,6 +677,9 @@ export function isTypeof(value: any, theType: string): boolean;
|
|
|
668
677
|
// @public (undocumented)
|
|
669
678
|
export function isUndefined(value: any): boolean;
|
|
670
679
|
|
|
680
|
+
// @public
|
|
681
|
+
export function isXhrSupported(): boolean;
|
|
682
|
+
|
|
671
683
|
// @public
|
|
672
684
|
export interface ITelemetryItem {
|
|
673
685
|
baseData?: {
|
|
@@ -897,6 +909,9 @@ export function uaDisallowsSameSiteNone(userAgent: string): boolean;
|
|
|
897
909
|
// @public (undocumented)
|
|
898
910
|
export const Undefined = "undefined";
|
|
899
911
|
|
|
912
|
+
// @public (undocumented)
|
|
913
|
+
export function useXDomainRequest(): boolean | undefined;
|
|
914
|
+
|
|
900
915
|
// (No @packageDocumentation comment for this package)
|
|
901
916
|
|
|
902
917
|
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 2.7.
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 2.7.1-nightly.202110-04
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -42,6 +42,10 @@ declare namespace ApplicationInsights {
|
|
|
42
42
|
* Periodically check logger.queue for
|
|
43
43
|
*/
|
|
44
44
|
pollInternalLogs(eventName?: string): number;
|
|
45
|
+
/**
|
|
46
|
+
* Periodically check logger.queue for
|
|
47
|
+
*/
|
|
48
|
+
stopPollingInternalLogs(): void;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
function areCookiesSupported(logger?: IDiagnosticLogger): any;
|
|
@@ -519,6 +523,7 @@ declare namespace ApplicationInsights {
|
|
|
519
523
|
*/
|
|
520
524
|
removeNotificationListener?(listener: INotificationListener): void;
|
|
521
525
|
pollInternalLogs?(eventName?: string): number;
|
|
526
|
+
stopPollingInternalLogs?(): void;
|
|
522
527
|
/**
|
|
523
528
|
* Return a new instance of the IProcessTelemetryContext for processing events
|
|
524
529
|
*/
|
|
@@ -1514,6 +1519,12 @@ declare namespace ApplicationInsights {
|
|
|
1514
1519
|
*/
|
|
1515
1520
|
function isArray(obj: any): boolean;
|
|
1516
1521
|
|
|
1522
|
+
/**
|
|
1523
|
+
* Checks if HTML5 Beacons are supported in the current environment.
|
|
1524
|
+
* @returns True if supported, false otherwise.
|
|
1525
|
+
*/
|
|
1526
|
+
function isBeaconsSupported(): boolean;
|
|
1527
|
+
|
|
1517
1528
|
/**
|
|
1518
1529
|
* Checks if the type of value is a boolean.
|
|
1519
1530
|
* @param {any} value - Value to be checked.
|
|
@@ -1531,6 +1542,13 @@ declare namespace ApplicationInsights {
|
|
|
1531
1542
|
*/
|
|
1532
1543
|
function isError(obj: any): obj is Error;
|
|
1533
1544
|
|
|
1545
|
+
/**
|
|
1546
|
+
* Checks if the Fetch API is supported in the current environment.
|
|
1547
|
+
* @param withKeepAlive - [Optional] If True, check if fetch is available and it supports the keepalive feature, otherwise only check if fetch is supported
|
|
1548
|
+
* @returns True if supported, otherwise false
|
|
1549
|
+
*/
|
|
1550
|
+
function isFetchSupported(withKeepAlive?: boolean): boolean;
|
|
1551
|
+
|
|
1534
1552
|
function isFunction(value: any): value is Function;
|
|
1535
1553
|
|
|
1536
1554
|
/**
|
|
@@ -1583,6 +1601,12 @@ declare namespace ApplicationInsights {
|
|
|
1583
1601
|
|
|
1584
1602
|
function isUndefined(value: any): boolean;
|
|
1585
1603
|
|
|
1604
|
+
/**
|
|
1605
|
+
* Checks if XMLHttpRequest is supported
|
|
1606
|
+
* @returns True if supported, otherwise false
|
|
1607
|
+
*/
|
|
1608
|
+
function isXhrSupported(): boolean;
|
|
1609
|
+
|
|
1586
1610
|
/**
|
|
1587
1611
|
* Telemety item supported in Core
|
|
1588
1612
|
*/
|
|
@@ -2116,5 +2140,7 @@ declare namespace ApplicationInsights {
|
|
|
2116
2140
|
|
|
2117
2141
|
const Undefined = "undefined";
|
|
2118
2142
|
|
|
2143
|
+
function useXDomainRequest(): boolean | undefined;
|
|
2144
|
+
|
|
2119
2145
|
|
|
2120
2146
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 2.7.
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 2.7.1-nightly.202110-04
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
6
6
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
7
7
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
8
8
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.Microsoft = global.Microsoft || {}, global.Microsoft.ApplicationInsights = global.Microsoft.ApplicationInsights || {})));
|
|
9
|
-
}(this, (function (exports) { 'use strict';
|
|
9
|
+
})(this, (function (exports) { 'use strict';
|
|
10
10
|
|
|
11
11
|
var MinChannelPriorty = 100;
|
|
12
12
|
|
|
@@ -597,33 +597,45 @@
|
|
|
597
597
|
}
|
|
598
598
|
function arrForEach(arr, callbackfn, thisArg) {
|
|
599
599
|
var len = arr.length;
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
if (
|
|
603
|
-
|
|
600
|
+
try {
|
|
601
|
+
for (var idx = 0; idx < len; idx++) {
|
|
602
|
+
if (idx in arr) {
|
|
603
|
+
if (callbackfn.call(thisArg || arr, arr[idx], idx, arr) === -1) {
|
|
604
|
+
break;
|
|
605
|
+
}
|
|
604
606
|
}
|
|
605
607
|
}
|
|
606
608
|
}
|
|
609
|
+
catch (e) {
|
|
610
|
+
}
|
|
607
611
|
}
|
|
608
612
|
function arrIndexOf(arr, searchElement, fromIndex) {
|
|
609
613
|
var len = arr.length;
|
|
610
614
|
var from = fromIndex || 0;
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
615
|
+
try {
|
|
616
|
+
for (var lp = Math.max(from >= 0 ? from : len - Math.abs(from), 0); lp < len; lp++) {
|
|
617
|
+
if (lp in arr && arr[lp] === searchElement) {
|
|
618
|
+
return lp;
|
|
619
|
+
}
|
|
614
620
|
}
|
|
615
621
|
}
|
|
622
|
+
catch (e) {
|
|
623
|
+
}
|
|
616
624
|
return -1;
|
|
617
625
|
}
|
|
618
626
|
function arrMap(arr, callbackfn, thisArg) {
|
|
619
627
|
var len = arr.length;
|
|
620
628
|
var _this = thisArg || arr;
|
|
621
629
|
var results = new Array(len);
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
630
|
+
try {
|
|
631
|
+
for (var lp = 0; lp < len; lp++) {
|
|
632
|
+
if (lp in arr) {
|
|
633
|
+
results[lp] = callbackfn.call(_this, arr[lp], arr);
|
|
634
|
+
}
|
|
625
635
|
}
|
|
626
636
|
}
|
|
637
|
+
catch (e) {
|
|
638
|
+
}
|
|
627
639
|
return results;
|
|
628
640
|
}
|
|
629
641
|
function arrReduce(arr, callbackfn, initialValue) {
|
|
@@ -835,6 +847,33 @@
|
|
|
835
847
|
var _isTrident = null;
|
|
836
848
|
var _navUserAgentCheck = null;
|
|
837
849
|
var _enableMocks = false;
|
|
850
|
+
var _useXDomainRequest = null;
|
|
851
|
+
var _beaconsSupported = null;
|
|
852
|
+
function _hasProperty(theClass, property) {
|
|
853
|
+
var supported = false;
|
|
854
|
+
if (theClass) {
|
|
855
|
+
try {
|
|
856
|
+
supported = property in theClass;
|
|
857
|
+
if (!supported) {
|
|
858
|
+
var proto = theClass[strShimPrototype];
|
|
859
|
+
if (proto) {
|
|
860
|
+
supported = property in proto;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
catch (e) {
|
|
865
|
+
}
|
|
866
|
+
if (!supported) {
|
|
867
|
+
try {
|
|
868
|
+
var tmp = new theClass();
|
|
869
|
+
supported = !isUndefined(tmp[property]);
|
|
870
|
+
}
|
|
871
|
+
catch (e) {
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
return supported;
|
|
876
|
+
}
|
|
838
877
|
function setEnableEnvMocks(enabled) {
|
|
839
878
|
_enableMocks = enabled;
|
|
840
879
|
}
|
|
@@ -973,6 +1012,45 @@
|
|
|
973
1012
|
var ua = (userAgentStr || "").toLowerCase();
|
|
974
1013
|
return (ua.indexOf('safari') >= 0);
|
|
975
1014
|
}
|
|
1015
|
+
function isBeaconsSupported() {
|
|
1016
|
+
if (_beaconsSupported === null) {
|
|
1017
|
+
_beaconsSupported = hasNavigator() && Boolean(getNavigator().sendBeacon);
|
|
1018
|
+
}
|
|
1019
|
+
return _beaconsSupported;
|
|
1020
|
+
}
|
|
1021
|
+
function isFetchSupported(withKeepAlive) {
|
|
1022
|
+
var isSupported = false;
|
|
1023
|
+
try {
|
|
1024
|
+
var fetchApi = getGlobalInst("fetch");
|
|
1025
|
+
isSupported = !!fetchApi;
|
|
1026
|
+
var request = getGlobalInst("Request");
|
|
1027
|
+
if (isSupported && withKeepAlive && request) {
|
|
1028
|
+
isSupported = _hasProperty(request, "keepalive");
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
catch (e) {
|
|
1032
|
+
}
|
|
1033
|
+
return isSupported;
|
|
1034
|
+
}
|
|
1035
|
+
function useXDomainRequest() {
|
|
1036
|
+
if (_useXDomainRequest === null) {
|
|
1037
|
+
_useXDomainRequest = (typeof XDomainRequest !== undefined);
|
|
1038
|
+
if (_useXDomainRequest && isXhrSupported()) {
|
|
1039
|
+
_useXDomainRequest = _useXDomainRequest && !_hasProperty(getGlobalInst("XMLHttpRequest"), "withCredentials");
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
return _useXDomainRequest;
|
|
1043
|
+
}
|
|
1044
|
+
function isXhrSupported() {
|
|
1045
|
+
var isSupported = false;
|
|
1046
|
+
try {
|
|
1047
|
+
var xmlHttpRequest = getGlobalInst("XMLHttpRequest");
|
|
1048
|
+
isSupported = !!xmlHttpRequest;
|
|
1049
|
+
}
|
|
1050
|
+
catch (e) {
|
|
1051
|
+
}
|
|
1052
|
+
return isSupported;
|
|
1053
|
+
}
|
|
976
1054
|
|
|
977
1055
|
var AiNonUserActionablePrefix = "AI (Internal): ";
|
|
978
1056
|
var AiUserActionablePrefix = "AI: ";
|
|
@@ -1282,7 +1360,7 @@
|
|
|
1282
1360
|
catch (error) {
|
|
1283
1361
|
var hasRun = _nextProxy && _nextProxy._hasRun;
|
|
1284
1362
|
if (!_nextProxy || !hasRun) {
|
|
1285
|
-
itemCtx.diagLog().throwInternal(exports.LoggingSeverity.CRITICAL, _InternalMessageId.PluginException, "Plugin [" + plugin.identifier + "] failed during processTelemetry - " + error);
|
|
1363
|
+
itemCtx.diagLog().throwInternal(exports.LoggingSeverity.CRITICAL, _InternalMessageId.PluginException, "Plugin [" + plugin.identifier + "] failed during processTelemetry - " + dumpObj(error));
|
|
1286
1364
|
}
|
|
1287
1365
|
if (_nextProxy && !hasRun) {
|
|
1288
1366
|
_nextProxy.processTelemetry(env, itemCtx);
|
|
@@ -1901,7 +1979,7 @@
|
|
|
1901
1979
|
_self.logger = logger;
|
|
1902
1980
|
}
|
|
1903
1981
|
var allExtensions = [];
|
|
1904
|
-
allExtensions.push.apply(allExtensions, __spreadArrayFn(__spreadArrayFn([], extensions), config.extensions));
|
|
1982
|
+
allExtensions.push.apply(allExtensions, __spreadArrayFn(__spreadArrayFn([], extensions, false), config.extensions));
|
|
1905
1983
|
allExtensions = sortPlugins(allExtensions);
|
|
1906
1984
|
var coreExtensions = [];
|
|
1907
1985
|
var extPriorities = {};
|
|
@@ -2081,6 +2159,7 @@
|
|
|
2081
2159
|
__extendsFn(AppInsightsCore, _super);
|
|
2082
2160
|
function AppInsightsCore() {
|
|
2083
2161
|
var _this = _super.call(this) || this;
|
|
2162
|
+
var _internalLogPoller = 0;
|
|
2084
2163
|
dynamicProto(AppInsightsCore, _this, function (_self, _base) {
|
|
2085
2164
|
_self.initialize = function (config, extensions, logger, notificationManager) {
|
|
2086
2165
|
_base.initialize(config, extensions, logger || new DiagnosticLogger(config), notificationManager || new NotificationManager(config));
|
|
@@ -2112,7 +2191,10 @@
|
|
|
2112
2191
|
if (!interval || !(interval > 0)) {
|
|
2113
2192
|
interval = 10000;
|
|
2114
2193
|
}
|
|
2115
|
-
|
|
2194
|
+
if (_internalLogPoller) {
|
|
2195
|
+
_self.stopPollingInternalLogs();
|
|
2196
|
+
}
|
|
2197
|
+
_internalLogPoller = setInterval(function () {
|
|
2116
2198
|
var queue = _self.logger ? _self.logger.queue : [];
|
|
2117
2199
|
arrForEach(queue, function (logMessage) {
|
|
2118
2200
|
var item = {
|
|
@@ -2126,6 +2208,13 @@
|
|
|
2126
2208
|
});
|
|
2127
2209
|
queue.length = 0;
|
|
2128
2210
|
}, interval);
|
|
2211
|
+
return _internalLogPoller;
|
|
2212
|
+
};
|
|
2213
|
+
_self.stopPollingInternalLogs = function () {
|
|
2214
|
+
if (!_internalLogPoller)
|
|
2215
|
+
return;
|
|
2216
|
+
clearInterval(_internalLogPoller);
|
|
2217
|
+
_internalLogPoller = 0;
|
|
2129
2218
|
};
|
|
2130
2219
|
function _validateTelemetryItem(telemetryItem) {
|
|
2131
2220
|
if (isNullOrUndefined(telemetryItem.name)) {
|
|
@@ -2222,7 +2311,7 @@
|
|
|
2222
2311
|
}
|
|
2223
2312
|
var doc = getDocument();
|
|
2224
2313
|
if (doc) {
|
|
2225
|
-
result =
|
|
2314
|
+
result = attachEvent(doc, eventName, callback) || result;
|
|
2226
2315
|
}
|
|
2227
2316
|
return result;
|
|
2228
2317
|
}
|
|
@@ -2601,9 +2690,11 @@
|
|
|
2601
2690
|
exports.hasWindow = hasWindow;
|
|
2602
2691
|
exports.initializePlugins = initializePlugins;
|
|
2603
2692
|
exports.isArray = isArray;
|
|
2693
|
+
exports.isBeaconsSupported = isBeaconsSupported;
|
|
2604
2694
|
exports.isBoolean = isBoolean;
|
|
2605
2695
|
exports.isDate = isDate;
|
|
2606
2696
|
exports.isError = isError;
|
|
2697
|
+
exports.isFetchSupported = isFetchSupported;
|
|
2607
2698
|
exports.isFunction = isFunction;
|
|
2608
2699
|
exports.isIE = isIE;
|
|
2609
2700
|
exports.isNotNullOrUndefined = isNotNullOrUndefined;
|
|
@@ -2619,6 +2710,7 @@
|
|
|
2619
2710
|
exports.isTruthy = isTruthy;
|
|
2620
2711
|
exports.isTypeof = isTypeof;
|
|
2621
2712
|
exports.isUndefined = isUndefined;
|
|
2713
|
+
exports.isXhrSupported = isXhrSupported;
|
|
2622
2714
|
exports.mwcRandom32 = mwcRandom32;
|
|
2623
2715
|
exports.mwcRandomSeed = mwcRandomSeed;
|
|
2624
2716
|
exports.newGuid = newGuid;
|
|
@@ -2655,8 +2747,9 @@
|
|
|
2655
2747
|
exports.throwError = throwError;
|
|
2656
2748
|
exports.toISOString = toISOString;
|
|
2657
2749
|
exports.uaDisallowsSameSiteNone = uaDisallowsSameSiteNone;
|
|
2750
|
+
exports.useXDomainRequest = useXDomainRequest;
|
|
2658
2751
|
|
|
2659
2752
|
(function(obj, prop, descriptor) { /* ai_es3_polyfil defineProperty */ var func = Object["defineProperty"]; if (func) { try { return func(obj, prop, descriptor); } catch(e) { /* IE8 defines defineProperty, but will throw */ } } if (descriptor && typeof descriptor.value !== undefined) { obj[prop] = descriptor.value; } return obj; })(exports, '__esModule', { value: true });
|
|
2660
2753
|
|
|
2661
|
-
}))
|
|
2754
|
+
}));
|
|
2662
2755
|
//# sourceMappingURL=applicationinsights-core-js.js.map
|