@microsoft/applicationinsights-common 2.7.5-nightly.2204-03 → 2.7.6
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-common.integrity.json +9 -9
- package/browser/applicationinsights-common.js +244 -853
- package/browser/applicationinsights-common.js.map +1 -1
- package/browser/applicationinsights-common.min.js +2 -2
- package/browser/applicationinsights-common.min.js.map +1 -1
- package/dist/applicationinsights-common.api.json +456 -386
- package/dist/applicationinsights-common.api.md +8 -21
- package/dist/applicationinsights-common.d.ts +12 -33
- package/dist/applicationinsights-common.js +244 -853
- package/dist/applicationinsights-common.js.map +1 -1
- package/dist/applicationinsights-common.min.js +2 -2
- package/dist/applicationinsights-common.min.js.map +1 -1
- package/dist/applicationinsights-common.rollup.d.ts +12 -33
- package/dist-esm/ConnectionStringParser.js +1 -1
- package/dist-esm/Constants.js +1 -1
- package/dist-esm/DomHelperFuncs.js +1 -1
- package/dist-esm/Enums.js +24 -11
- package/dist-esm/Enums.js.map +1 -1
- package/dist-esm/HelperFuncs.js +6 -7
- package/dist-esm/HelperFuncs.js.map +1 -1
- package/dist-esm/Interfaces/ConnectionString.js +1 -1
- package/dist-esm/Interfaces/Context/IApplication.js +1 -1
- package/dist-esm/Interfaces/Context/IDevice.js +1 -1
- package/dist-esm/Interfaces/Context/IInternal.js +1 -1
- package/dist-esm/Interfaces/Context/ILocation.js +1 -1
- package/dist-esm/Interfaces/Context/IOperatingSystem.js +1 -1
- package/dist-esm/Interfaces/Context/ISample.js +1 -1
- package/dist-esm/Interfaces/Context/ISession.js +1 -1
- package/dist-esm/Interfaces/Context/ITelemetryTrace.js +1 -1
- package/dist-esm/Interfaces/Context/IUser.js +1 -1
- package/dist-esm/Interfaces/Context/IWeb.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/AvailabilityData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/Base.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/ContextTagKeys.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/Data.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/DataPoint.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/DataPointType.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/DependencyKind.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/DependencySourceType.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/Domain.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/Envelope.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/EventData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/MessageData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/MetricData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/PageViewData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/RequestData.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/SeverityLevel.js +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/StackFrame.js +1 -1
- package/dist-esm/Interfaces/IAppInsights.js +1 -1
- package/dist-esm/Interfaces/IChannelControlsAI.js +1 -1
- package/dist-esm/Interfaces/IConfig.js +1 -1
- package/dist-esm/Interfaces/ICorrelationConfig.js +1 -1
- package/dist-esm/Interfaces/IDependencyTelemetry.js +1 -1
- package/dist-esm/Interfaces/IEventTelemetry.js +1 -1
- package/dist-esm/Interfaces/IExceptionTelemetry.js +1 -1
- package/dist-esm/Interfaces/IMetricTelemetry.js +1 -1
- package/dist-esm/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
- package/dist-esm/Interfaces/IPageViewTelemetry.js +1 -1
- package/dist-esm/Interfaces/IPartC.js +1 -1
- package/dist-esm/Interfaces/IPropertiesPlugin.js +1 -1
- package/dist-esm/Interfaces/IRequestContext.js +1 -1
- package/dist-esm/Interfaces/ITelemetryContext.js +1 -1
- package/dist-esm/Interfaces/ITraceTelemetry.js +1 -1
- package/dist-esm/Interfaces/PartAExtensions.js +1 -1
- package/dist-esm/Interfaces/Telemetry/IEnvelope.js +1 -1
- package/dist-esm/Interfaces/Telemetry/ISerializable.js +1 -1
- package/dist-esm/RequestResponseHeaders.js +1 -1
- package/dist-esm/StorageHelperFuncs.js +12 -27
- package/dist-esm/StorageHelperFuncs.js.map +1 -1
- package/dist-esm/Telemetry/Common/Base.js +1 -1
- package/dist-esm/Telemetry/Common/Data.js +1 -1
- package/dist-esm/Telemetry/Common/DataPoint.js +1 -1
- package/dist-esm/Telemetry/Common/DataSanitizer.js +8 -8
- package/dist-esm/Telemetry/Common/DataSanitizer.js.map +1 -1
- package/dist-esm/Telemetry/Common/Envelope.js +1 -1
- package/dist-esm/Telemetry/Event.js +1 -1
- package/dist-esm/Telemetry/Exception.js +1 -1
- package/dist-esm/Telemetry/Metric.js +1 -1
- package/dist-esm/Telemetry/PageView.js +1 -1
- package/dist-esm/Telemetry/PageViewPerformance.js +1 -1
- package/dist-esm/Telemetry/RemoteDependencyData.js +1 -1
- package/dist-esm/Telemetry/Trace.js +1 -1
- package/dist-esm/TelemetryItemCreator.js +1 -1
- package/dist-esm/UrlHelperFuncs.js +1 -1
- package/dist-esm/Util.js +3 -3
- package/dist-esm/Util.js.map +1 -1
- package/dist-esm/applicationinsights-common.js +2 -2
- package/dist-esm/applicationinsights-common.js.map +1 -1
- package/package.json +54 -57
- package/src/Enums.ts +3 -19
- package/src/HelperFuncs.ts +5 -7
- package/src/StorageHelperFuncs.ts +17 -34
- package/src/Telemetry/Common/DataSanitizer.ts +13 -13
- package/src/Telemetry/Exception.ts +15 -27
- package/src/TelemetryItemCreator.ts +1 -1
- package/src/Util.ts +3 -2
- package/src/applicationinsights-common.ts +2 -2
- package/types/Enums.d.ts +2 -13
- package/types/StorageHelperFuncs.d.ts +2 -14
- package/types/applicationinsights-common.d.ts +2 -2
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/Interfaces/Contracts/AvailabilityData.js +0 -52
- package/dist-esm/Interfaces/Contracts/AvailabilityData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/ContextTagKeys.js +0 -89
- package/dist-esm/Interfaces/Contracts/ContextTagKeys.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/DataPointType.js +0 -8
- package/dist-esm/Interfaces/Contracts/DataPointType.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/DependencyKind.js +0 -8
- package/dist-esm/Interfaces/Contracts/DependencyKind.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/DependencySourceType.js +0 -8
- package/dist-esm/Interfaces/Contracts/DependencySourceType.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IBase.js +0 -8
- package/dist-esm/Interfaces/Contracts/IBase.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IData.js +0 -8
- package/dist-esm/Interfaces/Contracts/IData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IDataPoint.js +0 -6
- package/dist-esm/Interfaces/Contracts/IDataPoint.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IDomain.js +0 -8
- package/dist-esm/Interfaces/Contracts/IDomain.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IEnvelope.js +0 -46
- package/dist-esm/Interfaces/Contracts/IEnvelope.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IEventData.js +0 -8
- package/dist-esm/Interfaces/Contracts/IEventData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IExceptionData.js +0 -8
- package/dist-esm/Interfaces/Contracts/IExceptionData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +0 -8
- package/dist-esm/Interfaces/Contracts/IExceptionDetails.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IMessageData.js +0 -8
- package/dist-esm/Interfaces/Contracts/IMessageData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IMetricData.js +0 -8
- package/dist-esm/Interfaces/Contracts/IMetricData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IPageViewData.js +0 -8
- package/dist-esm/Interfaces/Contracts/IPageViewData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +0 -8
- package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +0 -8
- package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/IStackFrame.js +0 -8
- package/dist-esm/Interfaces/Contracts/IStackFrame.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/RequestData.js +0 -46
- package/dist-esm/Interfaces/Contracts/RequestData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/SeverityLevel.js +0 -19
- package/dist-esm/Interfaces/Contracts/SeverityLevel.js.map +0 -1
- package/src/Interfaces/Contracts/AvailabilityData.ts +0 -57
- package/src/Interfaces/Contracts/ContextTagKeys.ts +0 -299
- package/src/Interfaces/Contracts/DataPointType.ts +0 -10
- package/src/Interfaces/Contracts/DependencyKind.ts +0 -11
- package/src/Interfaces/Contracts/DependencySourceType.ts +0 -11
- package/src/Interfaces/Contracts/IBase.ts +0 -13
- package/src/Interfaces/Contracts/IData.ts +0 -19
- package/src/Interfaces/Contracts/IDataPoint.ts +0 -44
- package/src/Interfaces/Contracts/IDomain.ts +0 -8
- package/src/Interfaces/Contracts/IEnvelope.ts +0 -50
- package/src/Interfaces/Contracts/IEventData.ts +0 -30
- package/src/Interfaces/Contracts/IExceptionData.ts +0 -37
- package/src/Interfaces/Contracts/IExceptionDetails.ts +0 -45
- package/src/Interfaces/Contracts/IMessageData.ts +0 -36
- package/src/Interfaces/Contracts/IMetricData.ts +0 -31
- package/src/Interfaces/Contracts/IPageViewData.ts +0 -26
- package/src/Interfaces/Contracts/IPageViewPerfData.ts +0 -35
- package/src/Interfaces/Contracts/IRemoteDependencyData.ts +0 -65
- package/src/Interfaces/Contracts/IStackFrame.ts +0 -33
- package/src/Interfaces/Contracts/RequestData.ts +0 -50
- package/src/Interfaces/Contracts/SeverityLevel.ts +0 -15
- package/types/Interfaces/Contracts/AvailabilityData.d.ts +0 -0
- package/types/Interfaces/Contracts/ContextTagKeys.d.ts +0 -175
- package/types/Interfaces/Contracts/DataPointType.d.ts +0 -7
- package/types/Interfaces/Contracts/DependencyKind.d.ts +0 -8
- package/types/Interfaces/Contracts/DependencySourceType.d.ts +0 -8
- package/types/Interfaces/Contracts/IBase.d.ts +0 -9
- package/types/Interfaces/Contracts/IData.d.ts +0 -14
- package/types/Interfaces/Contracts/IDataPoint.d.ts +0 -34
- package/types/Interfaces/Contracts/IDomain.d.ts +0 -5
- package/types/Interfaces/Contracts/IEnvelope.d.ts +0 -0
- package/types/Interfaces/Contracts/IEventData.d.ts +0 -22
- package/types/Interfaces/Contracts/IExceptionData.d.ts +0 -28
- package/types/Interfaces/Contracts/IExceptionDetails.d.ts +0 -34
- package/types/Interfaces/Contracts/IMessageData.d.ts +0 -27
- package/types/Interfaces/Contracts/IMetricData.d.ts +0 -23
- package/types/Interfaces/Contracts/IPageViewData.d.ts +0 -18
- package/types/Interfaces/Contracts/IPageViewPerfData.d.ts +0 -26
- package/types/Interfaces/Contracts/IRemoteDependencyData.d.ts +0 -50
- package/types/Interfaces/Contracts/IStackFrame.d.ts +0 -25
- package/types/Interfaces/Contracts/RequestData.d.ts +0 -0
- package/types/Interfaces/Contracts/SeverityLevel.d.ts +0 -10
package/src/Enums.ts
CHANGED
|
@@ -1,35 +1,26 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
-
import { createEnumStyle } from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
|
|
6
4
|
/**
|
|
7
5
|
* Type of storage to differentiate between local storage and session storage
|
|
8
6
|
*/
|
|
9
|
-
export
|
|
7
|
+
export enum StorageType {
|
|
10
8
|
LocalStorage,
|
|
11
9
|
SessionStorage
|
|
12
10
|
}
|
|
13
11
|
|
|
14
|
-
export const StorageType = createEnumStyle<{ [key in (keyof typeof eStorageType)]: number; }>({
|
|
15
|
-
LocalStorage: eStorageType.LocalStorage,
|
|
16
|
-
SessionStorage: eStorageType.SessionStorage
|
|
17
|
-
});
|
|
18
|
-
export type StorageType = eStorageType | typeof StorageType;
|
|
19
|
-
|
|
20
|
-
|
|
21
12
|
/**
|
|
22
13
|
* Enum is used in aiDataContract to describe how fields are serialized.
|
|
23
14
|
* For instance: (Fieldtype.Required | FieldType.Array) will mark the field as required and indicate it's an array
|
|
24
15
|
*/
|
|
25
16
|
export const enum FieldType { Default = 0, Required = 1, Array = 2, Hidden = 4 }
|
|
26
17
|
|
|
27
|
-
export
|
|
18
|
+
export enum DistributedTracingModes {
|
|
28
19
|
/**
|
|
29
20
|
* (Default) Send Application Insights correlation headers
|
|
30
21
|
*/
|
|
31
22
|
|
|
32
|
-
AI
|
|
23
|
+
AI=0,
|
|
33
24
|
|
|
34
25
|
/**
|
|
35
26
|
* Send both W3C Trace Context headers and back-compatibility Application Insights headers
|
|
@@ -41,10 +32,3 @@ export const enum eDistributedTracingModes {
|
|
|
41
32
|
*/
|
|
42
33
|
W3C
|
|
43
34
|
}
|
|
44
|
-
|
|
45
|
-
export const DistributedTracingModes = createEnumStyle<{ [key in (keyof typeof eDistributedTracingModes)]: number; }>({
|
|
46
|
-
AI: eDistributedTracingModes.AI,
|
|
47
|
-
AI_AND_W3C: eDistributedTracingModes.AI_AND_W3C,
|
|
48
|
-
W3C: eDistributedTracingModes.W3C
|
|
49
|
-
});
|
|
50
|
-
export type DistributedTracingModes = number | eDistributedTracingModes;
|
package/src/HelperFuncs.ts
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
import { arrForEach, IPlugin, isString } from "@microsoft/applicationinsights-core-js";
|
|
5
5
|
|
|
6
|
-
const strEmpty = "";
|
|
7
|
-
|
|
8
6
|
export function stringToBoolOrDefault(str: any, defaultValue = false): boolean {
|
|
9
7
|
if (str === undefined || str === null) {
|
|
10
8
|
return defaultValue;
|
|
@@ -23,10 +21,10 @@ export function msToTimeSpan(totalms: number): string {
|
|
|
23
21
|
|
|
24
22
|
totalms = Math.round(totalms);
|
|
25
23
|
|
|
26
|
-
let ms =
|
|
27
|
-
let sec =
|
|
28
|
-
let min =
|
|
29
|
-
let hour =
|
|
24
|
+
let ms = "" + totalms % 1000;
|
|
25
|
+
let sec = "" + Math.floor(totalms / 1000) % 60;
|
|
26
|
+
let min = "" + Math.floor(totalms / (1000 * 60)) % 60;
|
|
27
|
+
let hour = "" + Math.floor(totalms / (1000 * 60 * 60)) % 24;
|
|
30
28
|
const days = Math.floor(totalms / (1000 * 60 * 60 * 24));
|
|
31
29
|
|
|
32
30
|
ms = ms.length === 1 ? "00" + ms : ms.length === 2 ? "0" + ms : ms;
|
|
@@ -34,7 +32,7 @@ export function msToTimeSpan(totalms: number): string {
|
|
|
34
32
|
min = min.length < 2 ? "0" + min : min;
|
|
35
33
|
hour = hour.length < 2 ? "0" + hour : hour;
|
|
36
34
|
|
|
37
|
-
return (days > 0 ? days + "." :
|
|
35
|
+
return (days > 0 ? days + "." : "") + hour + ":" + min + ":" + sec + "." + ms;
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
export function getExtensionByName(extensions: IPlugin[], identifier: string): IPlugin | null {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
-
import { dumpObj, getExceptionName, getGlobal, getGlobalInst, IDiagnosticLogger, isNullOrUndefined,
|
|
4
|
+
import { dumpObj, getExceptionName, getGlobal, getGlobalInst, IDiagnosticLogger, isNullOrUndefined, LoggingSeverity, objForEachKey, _InternalMessageId } from "@microsoft/applicationinsights-core-js";
|
|
5
5
|
import { StorageType } from "./Enums";
|
|
6
6
|
|
|
7
7
|
let _canUseLocalStorage: boolean = undefined;
|
|
@@ -57,29 +57,13 @@ function _getSessionStorageObject(): Storage {
|
|
|
57
57
|
return null;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
/**
|
|
61
|
-
* Disables the global SDK usage of local or session storage if available
|
|
62
|
-
*/
|
|
63
60
|
export function utlDisableStorage() {
|
|
64
61
|
_canUseLocalStorage = false;
|
|
65
62
|
_canUseSessionStorage = false;
|
|
66
63
|
}
|
|
67
64
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
*/
|
|
71
|
-
export function utlEnableStorage() {
|
|
72
|
-
_canUseLocalStorage = utlCanUseLocalStorage(true);
|
|
73
|
-
_canUseSessionStorage = utlCanUseSessionStorage(true);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Returns whether LocalStorage can be used, if the reset parameter is passed a true this will override
|
|
78
|
-
* any previous disable calls.
|
|
79
|
-
* @param reset - Should the usage be reset and determined only based on whether LocalStorage is available
|
|
80
|
-
*/
|
|
81
|
-
export function utlCanUseLocalStorage(reset?: boolean): boolean {
|
|
82
|
-
if (reset || _canUseLocalStorage === undefined) {
|
|
65
|
+
export function utlCanUseLocalStorage(): boolean {
|
|
66
|
+
if (_canUseLocalStorage === undefined) {
|
|
83
67
|
_canUseLocalStorage = !!_getVerifiedStorageObject(StorageType.LocalStorage);
|
|
84
68
|
}
|
|
85
69
|
|
|
@@ -94,8 +78,8 @@ export function utlGetLocalStorage(logger: IDiagnosticLogger, name: string): str
|
|
|
94
78
|
} catch (e) {
|
|
95
79
|
_canUseLocalStorage = false;
|
|
96
80
|
|
|
97
|
-
|
|
98
|
-
|
|
81
|
+
logger.throwInternal(
|
|
82
|
+
LoggingSeverity.WARNING,
|
|
99
83
|
_InternalMessageId.BrowserCannotReadLocalStorage,
|
|
100
84
|
"Browser failed read of local storage. " + getExceptionName(e),
|
|
101
85
|
{ exception: dumpObj(e) });
|
|
@@ -113,8 +97,8 @@ export function utlSetLocalStorage(logger: IDiagnosticLogger, name: string, data
|
|
|
113
97
|
} catch (e) {
|
|
114
98
|
_canUseLocalStorage = false;
|
|
115
99
|
|
|
116
|
-
|
|
117
|
-
|
|
100
|
+
logger.throwInternal(
|
|
101
|
+
LoggingSeverity.WARNING,
|
|
118
102
|
_InternalMessageId.BrowserCannotWriteLocalStorage,
|
|
119
103
|
"Browser failed write to local storage. " + getExceptionName(e),
|
|
120
104
|
{ exception: dumpObj(e) });
|
|
@@ -132,8 +116,8 @@ export function utlRemoveStorage(logger: IDiagnosticLogger, name: string): boole
|
|
|
132
116
|
} catch (e) {
|
|
133
117
|
_canUseLocalStorage = false;
|
|
134
118
|
|
|
135
|
-
|
|
136
|
-
|
|
119
|
+
logger.throwInternal(
|
|
120
|
+
LoggingSeverity.WARNING,
|
|
137
121
|
_InternalMessageId.BrowserFailedRemovalFromLocalStorage,
|
|
138
122
|
"Browser failed removal of local storage item. " + getExceptionName(e),
|
|
139
123
|
{ exception: dumpObj(e) });
|
|
@@ -142,8 +126,8 @@ export function utlRemoveStorage(logger: IDiagnosticLogger, name: string): boole
|
|
|
142
126
|
return false;
|
|
143
127
|
}
|
|
144
128
|
|
|
145
|
-
export function utlCanUseSessionStorage(
|
|
146
|
-
if (
|
|
129
|
+
export function utlCanUseSessionStorage(): boolean {
|
|
130
|
+
if (_canUseSessionStorage === undefined) {
|
|
147
131
|
_canUseSessionStorage = !!_getVerifiedStorageObject(StorageType.SessionStorage);
|
|
148
132
|
}
|
|
149
133
|
|
|
@@ -170,8 +154,8 @@ export function utlGetSessionStorage(logger: IDiagnosticLogger, name: string): s
|
|
|
170
154
|
} catch (e) {
|
|
171
155
|
_canUseSessionStorage = false;
|
|
172
156
|
|
|
173
|
-
|
|
174
|
-
|
|
157
|
+
logger.throwInternal(
|
|
158
|
+
LoggingSeverity.WARNING,
|
|
175
159
|
_InternalMessageId.BrowserCannotReadSessionStorage,
|
|
176
160
|
"Browser failed read of session storage. " + getExceptionName(e),
|
|
177
161
|
{ exception: dumpObj(e) });
|
|
@@ -189,8 +173,8 @@ export function utlSetSessionStorage(logger: IDiagnosticLogger, name: string, da
|
|
|
189
173
|
} catch (e) {
|
|
190
174
|
_canUseSessionStorage = false;
|
|
191
175
|
|
|
192
|
-
|
|
193
|
-
|
|
176
|
+
logger.throwInternal(
|
|
177
|
+
LoggingSeverity.WARNING,
|
|
194
178
|
_InternalMessageId.BrowserCannotWriteSessionStorage,
|
|
195
179
|
"Browser failed write to session storage. " + getExceptionName(e),
|
|
196
180
|
{ exception: dumpObj(e) });
|
|
@@ -208,13 +192,12 @@ export function utlRemoveSessionStorage(logger: IDiagnosticLogger, name: string)
|
|
|
208
192
|
} catch (e) {
|
|
209
193
|
_canUseSessionStorage = false;
|
|
210
194
|
|
|
211
|
-
|
|
212
|
-
|
|
195
|
+
logger.throwInternal(
|
|
196
|
+
LoggingSeverity.WARNING,
|
|
213
197
|
_InternalMessageId.BrowserFailedRemovalFromSessionStorage,
|
|
214
198
|
"Browser failed removal of session storage item. " + getExceptionName(e),
|
|
215
199
|
{ exception: dumpObj(e) });
|
|
216
200
|
}
|
|
217
201
|
}
|
|
218
|
-
|
|
219
202
|
return false;
|
|
220
203
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
-
import { IDiagnosticLogger,
|
|
4
|
+
import { IDiagnosticLogger, LoggingSeverity, _InternalMessageId, hasJSON, getJSON, objForEachKey, isObject, strTrim } from "@microsoft/applicationinsights-core-js";
|
|
5
5
|
|
|
6
6
|
export const enum DataSanitizerValues {
|
|
7
7
|
/**
|
|
@@ -66,8 +66,8 @@ export function dataSanitizeKey(logger: IDiagnosticLogger, name: any) {
|
|
|
66
66
|
// truncate the string to 150 chars
|
|
67
67
|
if (name.length > DataSanitizerValues.MAX_NAME_LENGTH) {
|
|
68
68
|
nameTrunc = name.substring(0, DataSanitizerValues.MAX_NAME_LENGTH);
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
logger && logger.throwInternal(
|
|
70
|
+
LoggingSeverity.WARNING,
|
|
71
71
|
_InternalMessageId.NameTooLong,
|
|
72
72
|
"name is too long. It has been truncated to " + DataSanitizerValues.MAX_NAME_LENGTH + " characters.",
|
|
73
73
|
{ name }, true);
|
|
@@ -84,8 +84,8 @@ export function dataSanitizeString(logger: IDiagnosticLogger, value: any, maxLen
|
|
|
84
84
|
value = strTrim(value);
|
|
85
85
|
if (value.toString().length > maxLength) {
|
|
86
86
|
valueTrunc = value.toString().substring(0, maxLength);
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
logger && logger.throwInternal(
|
|
88
|
+
LoggingSeverity.WARNING,
|
|
89
89
|
_InternalMessageId.StringValueTooLong,
|
|
90
90
|
"string value is too long. It has been truncated to " + maxLength + " characters.",
|
|
91
91
|
{ value }, true);
|
|
@@ -104,8 +104,8 @@ export function dataSanitizeMessage(logger: IDiagnosticLogger, message: any) {
|
|
|
104
104
|
if (message) {
|
|
105
105
|
if (message.length > DataSanitizerValues.MAX_MESSAGE_LENGTH) {
|
|
106
106
|
messageTrunc = message.substring(0, DataSanitizerValues.MAX_MESSAGE_LENGTH);
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
logger && logger.throwInternal(
|
|
108
|
+
LoggingSeverity.WARNING, _InternalMessageId.MessageTruncated,
|
|
109
109
|
"message is too long, it has been truncated to " + DataSanitizerValues.MAX_MESSAGE_LENGTH + " characters.",
|
|
110
110
|
{ message },
|
|
111
111
|
true);
|
|
@@ -122,8 +122,8 @@ export function dataSanitizeException(logger: IDiagnosticLogger, exception: any)
|
|
|
122
122
|
let value:string = "" + exception;
|
|
123
123
|
if (value.length > DataSanitizerValues.MAX_EXCEPTION_LENGTH) {
|
|
124
124
|
exceptionTrunc = value.substring(0, DataSanitizerValues.MAX_EXCEPTION_LENGTH);
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
logger && logger.throwInternal(
|
|
126
|
+
LoggingSeverity.WARNING, _InternalMessageId.ExceptionTruncated, "exception is too long, it has been truncated to " + DataSanitizerValues.MAX_EXCEPTION_LENGTH + " characters.",
|
|
127
127
|
{ exception }, true);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
@@ -140,7 +140,7 @@ export function dataSanitizeProperties(logger: IDiagnosticLogger, properties: an
|
|
|
140
140
|
try {
|
|
141
141
|
value = getJSON().stringify(value);
|
|
142
142
|
} catch (e) {
|
|
143
|
-
|
|
143
|
+
logger && logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotSerializeObjectNonSerializable, "custom property is not valid", { exception: e}, true);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
value = dataSanitizeString(logger, value, DataSanitizerValues.MAX_PROPERTY_LENGTH);
|
|
@@ -177,8 +177,8 @@ export function dataSanitizeInput(logger: IDiagnosticLogger, input: any, maxLeng
|
|
|
177
177
|
input = strTrim(input);
|
|
178
178
|
if (input.length > maxLength) {
|
|
179
179
|
inputTrunc = input.substring(0, maxLength);
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
logger && logger.throwInternal(
|
|
181
|
+
LoggingSeverity.WARNING,
|
|
182
182
|
_msgId,
|
|
183
183
|
"input is too long, it has been truncated to " + maxLength + " characters.",
|
|
184
184
|
{ data: input },
|
|
@@ -282,4 +282,4 @@ export const DataSanitizer: IDataSanitizer = {
|
|
|
282
282
|
sanitizeInput: dataSanitizeInput,
|
|
283
283
|
padNumber: dsPadNumber,
|
|
284
284
|
trim: strTrim
|
|
285
|
-
};
|
|
285
|
+
};
|
|
@@ -341,44 +341,32 @@ export class Exception extends ExceptionData implements ISerializable {
|
|
|
341
341
|
this.exceptions = [new _ExceptionDetails(logger, exception, properties)];
|
|
342
342
|
this.properties = dataSanitizeProperties(logger, properties);
|
|
343
343
|
this.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
344
|
-
if (severityLevel) {
|
|
345
|
-
|
|
346
|
-
}
|
|
347
|
-
if (id) {
|
|
348
|
-
this.id = id;
|
|
349
|
-
}
|
|
344
|
+
if (severityLevel) { this.severityLevel = severityLevel; }
|
|
345
|
+
if (id) { this.id = id; }
|
|
350
346
|
} else {
|
|
351
347
|
this.exceptions = exception.exceptions;
|
|
352
348
|
this.properties = exception.properties;
|
|
353
349
|
this.measurements = exception.measurements;
|
|
354
|
-
if (exception.severityLevel) {
|
|
355
|
-
|
|
356
|
-
}
|
|
357
|
-
if (exception.id) {
|
|
358
|
-
this.id = exception.id;
|
|
359
|
-
}
|
|
360
|
-
if (exception.problemGroup) {
|
|
361
|
-
this.problemGroup = exception.problemGroup;
|
|
362
|
-
}
|
|
350
|
+
if (exception.severityLevel) { this.severityLevel = exception.severityLevel; }
|
|
351
|
+
if (exception.id) { this.id = exception.id; }
|
|
352
|
+
if (exception.problemGroup) { this.problemGroup = exception.problemGroup; }
|
|
363
353
|
|
|
364
354
|
// bool/int types, use isNullOrUndefined
|
|
365
355
|
this.ver = 2; // TODO: handle the CS"4.0" ==> breeze 2 conversion in a better way
|
|
366
|
-
if (!isNullOrUndefined(exception.isManual)) {
|
|
367
|
-
this.isManual = exception.isManual;
|
|
368
|
-
}
|
|
356
|
+
if (!isNullOrUndefined(exception.isManual)) { this.isManual = exception.isManual; }
|
|
369
357
|
}
|
|
370
358
|
}
|
|
371
359
|
|
|
372
360
|
public static CreateAutoException(
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
361
|
+
message: string | Event,
|
|
362
|
+
url: string,
|
|
363
|
+
lineNumber: number,
|
|
364
|
+
columnNumber: number,
|
|
365
|
+
error: any,
|
|
366
|
+
evt?: Event|string,
|
|
367
|
+
stack?: string,
|
|
368
|
+
errorSrc?: string
|
|
369
|
+
): IAutoExceptionTelemetry {
|
|
382
370
|
|
|
383
371
|
let errorType = _getErrorType(error || evt || message);
|
|
384
372
|
|
|
@@ -29,7 +29,7 @@ export class TelemetryItemCreator {
|
|
|
29
29
|
if (isNullOrUndefined(item) ||
|
|
30
30
|
isNullOrUndefined(baseType) ||
|
|
31
31
|
isNullOrUndefined(envelopeName)) {
|
|
32
|
-
|
|
32
|
+
throw Error("Input doesn't contain all required fields");
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
let iKey = "";
|
package/src/Util.ts
CHANGED
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
dateNow, uaDisallowsSameSiteNone, disableCookies as coreDisableCookies,
|
|
10
10
|
canUseCookies as coreCanUseCookies, getCookie as coreGetCookie,
|
|
11
11
|
setCookie as coreSetCookie, deleteCookie as coreDeleteCookie,
|
|
12
|
-
isBeaconsSupported
|
|
12
|
+
isBeaconsSupported,
|
|
13
|
+
arrIndexOf
|
|
13
14
|
} from "@microsoft/applicationinsights-core-js";
|
|
14
15
|
import { RequestHeaders } from "./RequestResponseHeaders";
|
|
15
16
|
import { dataSanitizeString } from "./Telemetry/Common/DataSanitizer";
|
|
@@ -28,7 +29,7 @@ const _internalEndpoints: string[] = [
|
|
|
28
29
|
];
|
|
29
30
|
|
|
30
31
|
export function isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean {
|
|
31
|
-
return _internalEndpoints
|
|
32
|
+
return arrIndexOf(_internalEndpoints, endpointUrl.toLowerCase()) !== -1;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
export interface IUtil {
|
|
@@ -57,12 +57,12 @@ export { IPropertiesPlugin } from "./Interfaces/IPropertiesPlugin";
|
|
|
57
57
|
export { IUser, IUserContext } from "./Interfaces/Context/IUser";
|
|
58
58
|
export { ITelemetryTrace, ITraceState } from "./Interfaces/Context/ITelemetryTrace";
|
|
59
59
|
export { IRequestContext } from "./Interfaces/IRequestContext";
|
|
60
|
-
export {
|
|
60
|
+
export { DistributedTracingModes } from "./Enums";
|
|
61
61
|
export { stringToBoolOrDefault, msToTimeSpan, getExtensionByName, isCrossOriginError } from "./HelperFuncs";
|
|
62
62
|
export { isBeaconsSupported as isBeaconApiSupported } from "@microsoft/applicationinsights-core-js"
|
|
63
63
|
export { createDomEvent } from "./DomHelperFuncs";
|
|
64
64
|
export {
|
|
65
|
-
utlDisableStorage,
|
|
65
|
+
utlDisableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage,
|
|
66
66
|
utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage
|
|
67
67
|
} from "./StorageHelperFuncs";
|
|
68
68
|
export { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from "./UrlHelperFuncs";
|
package/types/Enums.d.ts
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Type of storage to differentiate between local storage and session storage
|
|
3
3
|
*/
|
|
4
|
-
export declare
|
|
4
|
+
export declare enum StorageType {
|
|
5
5
|
LocalStorage = 0,
|
|
6
6
|
SessionStorage = 1
|
|
7
7
|
}
|
|
8
|
-
export declare const StorageType: {
|
|
9
|
-
LocalStorage: number;
|
|
10
|
-
SessionStorage: number;
|
|
11
|
-
};
|
|
12
|
-
export declare type StorageType = eStorageType | typeof StorageType;
|
|
13
8
|
/**
|
|
14
9
|
* Enum is used in aiDataContract to describe how fields are serialized.
|
|
15
10
|
* For instance: (Fieldtype.Required | FieldType.Array) will mark the field as required and indicate it's an array
|
|
@@ -20,7 +15,7 @@ export declare const enum FieldType {
|
|
|
20
15
|
Array = 2,
|
|
21
16
|
Hidden = 4
|
|
22
17
|
}
|
|
23
|
-
export declare
|
|
18
|
+
export declare enum DistributedTracingModes {
|
|
24
19
|
/**
|
|
25
20
|
* (Default) Send Application Insights correlation headers
|
|
26
21
|
*/
|
|
@@ -34,9 +29,3 @@ export declare const enum eDistributedTracingModes {
|
|
|
34
29
|
*/
|
|
35
30
|
W3C = 2
|
|
36
31
|
}
|
|
37
|
-
export declare const DistributedTracingModes: {
|
|
38
|
-
AI: number;
|
|
39
|
-
AI_AND_W3C: number;
|
|
40
|
-
W3C: number;
|
|
41
|
-
};
|
|
42
|
-
export declare type DistributedTracingModes = number | eDistributedTracingModes;
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
2
|
-
/**
|
|
3
|
-
* Disables the global SDK usage of local or session storage if available
|
|
4
|
-
*/
|
|
5
2
|
export declare function utlDisableStorage(): void;
|
|
6
|
-
|
|
7
|
-
* Re-enables the global SDK usage of local or session storage if available
|
|
8
|
-
*/
|
|
9
|
-
export declare function utlEnableStorage(): void;
|
|
10
|
-
/**
|
|
11
|
-
* Returns whether LocalStorage can be used, if the reset parameter is passed a true this will override
|
|
12
|
-
* any previous disable calls.
|
|
13
|
-
* @param reset - Should the usage be reset and determined only based on whether LocalStorage is available
|
|
14
|
-
*/
|
|
15
|
-
export declare function utlCanUseLocalStorage(reset?: boolean): boolean;
|
|
3
|
+
export declare function utlCanUseLocalStorage(): boolean;
|
|
16
4
|
export declare function utlGetLocalStorage(logger: IDiagnosticLogger, name: string): string;
|
|
17
5
|
export declare function utlSetLocalStorage(logger: IDiagnosticLogger, name: string, data: string): boolean;
|
|
18
6
|
export declare function utlRemoveStorage(logger: IDiagnosticLogger, name: string): boolean;
|
|
19
|
-
export declare function utlCanUseSessionStorage(
|
|
7
|
+
export declare function utlCanUseSessionStorage(): boolean;
|
|
20
8
|
export declare function utlGetSessionStorageKeys(): string[];
|
|
21
9
|
export declare function utlGetSessionStorage(logger: IDiagnosticLogger, name: string): string;
|
|
22
10
|
export declare function utlSetSessionStorage(logger: IDiagnosticLogger, name: string, data: string): boolean;
|
|
@@ -46,11 +46,11 @@ export { IPropertiesPlugin } from "./Interfaces/IPropertiesPlugin";
|
|
|
46
46
|
export { IUser, IUserContext } from "./Interfaces/Context/IUser";
|
|
47
47
|
export { ITelemetryTrace, ITraceState } from "./Interfaces/Context/ITelemetryTrace";
|
|
48
48
|
export { IRequestContext } from "./Interfaces/IRequestContext";
|
|
49
|
-
export {
|
|
49
|
+
export { DistributedTracingModes } from "./Enums";
|
|
50
50
|
export { stringToBoolOrDefault, msToTimeSpan, getExtensionByName, isCrossOriginError } from "./HelperFuncs";
|
|
51
51
|
export { isBeaconsSupported as isBeaconApiSupported } from "@microsoft/applicationinsights-core-js";
|
|
52
52
|
export { createDomEvent } from "./DomHelperFuncs";
|
|
53
|
-
export { utlDisableStorage,
|
|
53
|
+
export { utlDisableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage, utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage } from "./StorageHelperFuncs";
|
|
54
54
|
export { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from "./UrlHelperFuncs";
|
|
55
55
|
export declare const PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
|
|
56
56
|
export declare const BreezeChannelIdentifier = "AppInsightsChannelPlugin";
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 2.7.5-nightly.2204-03
|
|
3
|
-
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
|
-
*/
|
|
5
|
-
"use strict";
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// // THIS FILE WAS AUTOGENERATED
|
|
9
|
-
// import { Domain } from "./Domain";
|
|
10
|
-
// "use strict";
|
|
11
|
-
// /**
|
|
12
|
-
// * Instances of AvailabilityData represent the result of executing an availability test.
|
|
13
|
-
// */
|
|
14
|
-
// export class AvailabilityData implements Domain {
|
|
15
|
-
// /**
|
|
16
|
-
// * Schema version
|
|
17
|
-
// */
|
|
18
|
-
// public ver: number = 2;
|
|
19
|
-
// /**
|
|
20
|
-
// * Identifier of a test run. Use it to correlate steps of test run and telemetry generated by the service.
|
|
21
|
-
// */
|
|
22
|
-
// public id: string;
|
|
23
|
-
// /**
|
|
24
|
-
// * Name of the test that these availability results represent.
|
|
25
|
-
// */
|
|
26
|
-
// public name: string;
|
|
27
|
-
// /**
|
|
28
|
-
// * Duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.
|
|
29
|
-
// */
|
|
30
|
-
// public duration: string;
|
|
31
|
-
// /**
|
|
32
|
-
// * Success flag.
|
|
33
|
-
// */
|
|
34
|
-
// public success: boolean;
|
|
35
|
-
// /**
|
|
36
|
-
// * Name of the location where the test was run from.
|
|
37
|
-
// */
|
|
38
|
-
// public runLocation: string;
|
|
39
|
-
// /**
|
|
40
|
-
// * Diagnostic message for the result.
|
|
41
|
-
// */
|
|
42
|
-
// public message: string;
|
|
43
|
-
// /**
|
|
44
|
-
// * Collection of custom properties.
|
|
45
|
-
// */
|
|
46
|
-
// public properties: any = {};
|
|
47
|
-
// /**
|
|
48
|
-
// * Collection of custom measurements.
|
|
49
|
-
// */
|
|
50
|
-
// public measurements: any = {};
|
|
51
|
-
// }
|
|
52
|
-
//# sourceMappingURL=AvailabilityData.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AvailabilityData.js.map","sources":["AvailabilityData.js"],"sourcesContent":["\"use strict\";\r\n// // Copyright (c) Microsoft Corporation. All rights reserved.\r\n// // Licensed under the MIT License.\r\n// // THIS FILE WAS AUTOGENERATED\r\n// import { Domain } from \"./Domain\";\r\n// \"use strict\";\r\n// /**\r\n// * Instances of AvailabilityData represent the result of executing an availability test.\r\n// */\r\n// export class AvailabilityData implements Domain {\r\n// /**\r\n// * Schema version\r\n// */\r\n// public ver: number = 2;\r\n// /**\r\n// * Identifier of a test run. Use it to correlate steps of test run and telemetry generated by the service.\r\n// */\r\n// public id: string;\r\n// /**\r\n// * Name of the test that these availability results represent.\r\n// */\r\n// public name: string;\r\n// /**\r\n// * Duration in format: DD.HH:MM:SS.MMMMMM. Must be less than 1000 days.\r\n// */\r\n// public duration: string;\r\n// /**\r\n// * Success flag.\r\n// */\r\n// public success: boolean;\r\n// /**\r\n// * Name of the location where the test was run from.\r\n// */\r\n// public runLocation: string;\r\n// /**\r\n// * Diagnostic message for the result.\r\n// */\r\n// public message: string;\r\n// /**\r\n// * Collection of custom properties.\r\n// */\r\n// public properties: any = {};\r\n// /**\r\n// * Collection of custom measurements.\r\n// */\r\n// public measurements: any = {};\r\n// }\r\n//# sourceMappingURL=AvailabilityData.js.map"],"names":[],"mappings":";;;;AAAA;AACA,GAA+D;AAC/D,GAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 2.7.5-nightly.2204-03
|
|
3
|
-
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
|
|
8
|
-
import { createClassFromInterface } from "@microsoft/applicationinsights-core-js";
|
|
9
|
-
function _aiNameFunc(baseName) {
|
|
10
|
-
var aiName = "ai." + baseName + ".";
|
|
11
|
-
return function (name) {
|
|
12
|
-
return aiName + name;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
var _aiApplication = _aiNameFunc("application");
|
|
16
|
-
var _aiDevice = _aiNameFunc("device");
|
|
17
|
-
var _aiLocation = _aiNameFunc("location");
|
|
18
|
-
var _aiOperation = _aiNameFunc("operation");
|
|
19
|
-
var _aiSession = _aiNameFunc("session");
|
|
20
|
-
var _aiUser = _aiNameFunc("user");
|
|
21
|
-
var _aiCloud = _aiNameFunc("cloud");
|
|
22
|
-
var _aiInternal = _aiNameFunc("internal");
|
|
23
|
-
var ContextTagKeys = /** @class */ (function (_super) {
|
|
24
|
-
__extends(ContextTagKeys, _super);
|
|
25
|
-
function ContextTagKeys() {
|
|
26
|
-
return _super.call(this) || this;
|
|
27
|
-
}
|
|
28
|
-
return ContextTagKeys;
|
|
29
|
-
}(createClassFromInterface({
|
|
30
|
-
applicationVersion: _aiApplication("ver"),
|
|
31
|
-
applicationBuild: _aiApplication("build"),
|
|
32
|
-
applicationTypeId: _aiApplication("typeId"),
|
|
33
|
-
applicationId: _aiApplication("applicationId"),
|
|
34
|
-
applicationLayer: _aiApplication("layer"),
|
|
35
|
-
deviceId: _aiDevice("id"),
|
|
36
|
-
deviceIp: _aiDevice("ip"),
|
|
37
|
-
deviceLanguage: _aiDevice("language"),
|
|
38
|
-
deviceLocale: _aiDevice("locale"),
|
|
39
|
-
deviceModel: _aiDevice("model"),
|
|
40
|
-
deviceFriendlyName: _aiDevice("friendlyName"),
|
|
41
|
-
deviceNetwork: _aiDevice("network"),
|
|
42
|
-
deviceNetworkName: _aiDevice("networkName"),
|
|
43
|
-
deviceOEMName: _aiDevice("oemName"),
|
|
44
|
-
deviceOS: _aiDevice("os"),
|
|
45
|
-
deviceOSVersion: _aiDevice("osVersion"),
|
|
46
|
-
deviceRoleInstance: _aiDevice("roleInstance"),
|
|
47
|
-
deviceRoleName: _aiDevice("roleName"),
|
|
48
|
-
deviceScreenResolution: _aiDevice("screenResolution"),
|
|
49
|
-
deviceType: _aiDevice("type"),
|
|
50
|
-
deviceMachineName: _aiDevice("machineName"),
|
|
51
|
-
deviceVMName: _aiDevice("vmName"),
|
|
52
|
-
deviceBrowser: _aiDevice("browser"),
|
|
53
|
-
deviceBrowserVersion: _aiDevice("browserVersion"),
|
|
54
|
-
locationIp: _aiLocation("ip"),
|
|
55
|
-
locationCountry: _aiLocation("country"),
|
|
56
|
-
locationProvince: _aiLocation("province"),
|
|
57
|
-
locationCity: _aiLocation("city"),
|
|
58
|
-
operationId: _aiOperation("id"),
|
|
59
|
-
operationName: _aiOperation("name"),
|
|
60
|
-
operationParentId: _aiOperation("parentId"),
|
|
61
|
-
operationRootId: _aiOperation("rootId"),
|
|
62
|
-
operationSyntheticSource: _aiOperation("syntheticSource"),
|
|
63
|
-
operationCorrelationVector: _aiOperation("correlationVector"),
|
|
64
|
-
sessionId: _aiSession("id"),
|
|
65
|
-
sessionIsFirst: _aiSession("isFirst"),
|
|
66
|
-
sessionIsNew: _aiSession("isNew"),
|
|
67
|
-
userAccountAcquisitionDate: _aiUser("accountAcquisitionDate"),
|
|
68
|
-
userAccountId: _aiUser("accountId"),
|
|
69
|
-
userAgent: _aiUser("userAgent"),
|
|
70
|
-
userId: _aiUser("id"),
|
|
71
|
-
userStoreRegion: _aiUser("storeRegion"),
|
|
72
|
-
userAuthUserId: _aiUser("authUserId"),
|
|
73
|
-
userAnonymousUserAcquisitionDate: _aiUser("anonUserAcquisitionDate"),
|
|
74
|
-
userAuthenticatedUserAcquisitionDate: _aiUser("authUserAcquisitionDate"),
|
|
75
|
-
cloudName: _aiCloud("name"),
|
|
76
|
-
cloudRole: _aiCloud("role"),
|
|
77
|
-
cloudRoleVer: _aiCloud("roleVer"),
|
|
78
|
-
cloudRoleInstance: _aiCloud("roleInstance"),
|
|
79
|
-
cloudEnvironment: _aiCloud("environment"),
|
|
80
|
-
cloudLocation: _aiCloud("location"),
|
|
81
|
-
cloudDeploymentUnit: _aiCloud("deploymentUnit"),
|
|
82
|
-
internalNodeName: _aiInternal("nodeName"),
|
|
83
|
-
internalSdkVersion: _aiInternal("sdkVersion"),
|
|
84
|
-
internalAgentVersion: _aiInternal("agentVersion"),
|
|
85
|
-
internalSnippet: _aiInternal("snippet"),
|
|
86
|
-
internalSdkSrc: _aiInternal("sdkSrc")
|
|
87
|
-
})));
|
|
88
|
-
export { ContextTagKeys };
|
|
89
|
-
//# sourceMappingURL=ContextTagKeys.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContextTagKeys.js.map","sources":["ContextTagKeys.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { __extends } from \"tslib\";\r\nimport { createClassFromInterface } from \"@microsoft/applicationinsights-core-js\";\r\nfunction _aiNameFunc(baseName) {\r\n var aiName = \"ai.\" + baseName + \".\";\r\n return function (name) {\r\n return aiName + name;\r\n };\r\n}\r\nvar _aiApplication = _aiNameFunc(\"application\");\r\nvar _aiDevice = _aiNameFunc(\"device\");\r\nvar _aiLocation = _aiNameFunc(\"location\");\r\nvar _aiOperation = _aiNameFunc(\"operation\");\r\nvar _aiSession = _aiNameFunc(\"session\");\r\nvar _aiUser = _aiNameFunc(\"user\");\r\nvar _aiCloud = _aiNameFunc(\"cloud\");\r\nvar _aiInternal = _aiNameFunc(\"internal\");\r\nvar ContextTagKeys = /** @class */ (function (_super) {\r\n __extends(ContextTagKeys, _super);\r\n function ContextTagKeys() {\r\n return _super.call(this) || this;\r\n }\r\n return ContextTagKeys;\r\n}(createClassFromInterface({\r\n applicationVersion: _aiApplication(\"ver\"),\r\n applicationBuild: _aiApplication(\"build\"),\r\n applicationTypeId: _aiApplication(\"typeId\"),\r\n applicationId: _aiApplication(\"applicationId\"),\r\n applicationLayer: _aiApplication(\"layer\"),\r\n deviceId: _aiDevice(\"id\"),\r\n deviceIp: _aiDevice(\"ip\"),\r\n deviceLanguage: _aiDevice(\"language\"),\r\n deviceLocale: _aiDevice(\"locale\"),\r\n deviceModel: _aiDevice(\"model\"),\r\n deviceFriendlyName: _aiDevice(\"friendlyName\"),\r\n deviceNetwork: _aiDevice(\"network\"),\r\n deviceNetworkName: _aiDevice(\"networkName\"),\r\n deviceOEMName: _aiDevice(\"oemName\"),\r\n deviceOS: _aiDevice(\"os\"),\r\n deviceOSVersion: _aiDevice(\"osVersion\"),\r\n deviceRoleInstance: _aiDevice(\"roleInstance\"),\r\n deviceRoleName: _aiDevice(\"roleName\"),\r\n deviceScreenResolution: _aiDevice(\"screenResolution\"),\r\n deviceType: _aiDevice(\"type\"),\r\n deviceMachineName: _aiDevice(\"machineName\"),\r\n deviceVMName: _aiDevice(\"vmName\"),\r\n deviceBrowser: _aiDevice(\"browser\"),\r\n deviceBrowserVersion: _aiDevice(\"browserVersion\"),\r\n locationIp: _aiLocation(\"ip\"),\r\n locationCountry: _aiLocation(\"country\"),\r\n locationProvince: _aiLocation(\"province\"),\r\n locationCity: _aiLocation(\"city\"),\r\n operationId: _aiOperation(\"id\"),\r\n operationName: _aiOperation(\"name\"),\r\n operationParentId: _aiOperation(\"parentId\"),\r\n operationRootId: _aiOperation(\"rootId\"),\r\n operationSyntheticSource: _aiOperation(\"syntheticSource\"),\r\n operationCorrelationVector: _aiOperation(\"correlationVector\"),\r\n sessionId: _aiSession(\"id\"),\r\n sessionIsFirst: _aiSession(\"isFirst\"),\r\n sessionIsNew: _aiSession(\"isNew\"),\r\n userAccountAcquisitionDate: _aiUser(\"accountAcquisitionDate\"),\r\n userAccountId: _aiUser(\"accountId\"),\r\n userAgent: _aiUser(\"userAgent\"),\r\n userId: _aiUser(\"id\"),\r\n userStoreRegion: _aiUser(\"storeRegion\"),\r\n userAuthUserId: _aiUser(\"authUserId\"),\r\n userAnonymousUserAcquisitionDate: _aiUser(\"anonUserAcquisitionDate\"),\r\n userAuthenticatedUserAcquisitionDate: _aiUser(\"authUserAcquisitionDate\"),\r\n cloudName: _aiCloud(\"name\"),\r\n cloudRole: _aiCloud(\"role\"),\r\n cloudRoleVer: _aiCloud(\"roleVer\"),\r\n cloudRoleInstance: _aiCloud(\"roleInstance\"),\r\n cloudEnvironment: _aiCloud(\"environment\"),\r\n cloudLocation: _aiCloud(\"location\"),\r\n cloudDeploymentUnit: _aiCloud(\"deploymentUnit\"),\r\n internalNodeName: _aiInternal(\"nodeName\"),\r\n internalSdkVersion: _aiInternal(\"sdkVersion\"),\r\n internalAgentVersion: _aiInternal(\"agentVersion\"),\r\n internalSnippet: _aiInternal(\"snippet\"),\r\n internalSdkSrc: _aiInternal(\"sdkSrc\")\r\n})));\r\nexport { ContextTagKeys };\r\n//# sourceMappingURL=ContextTagKeys.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC,gFAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataPointType.js.map","sources":["DataPointType.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nexport {};\r\n//# sourceMappingURL=DataPointType.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA"}
|