@microsoft/applicationinsights-common 2.8.10-nightly.2212-03 → 2.8.10-nightly.2301-13
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 +2 -2
- 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.d.ts +1 -1
- package/dist/applicationinsights-common.js +2 -2
- 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 +1 -1
- 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 +1 -1
- package/dist-esm/HelperFuncs.js +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/AvailabilityData.js +1 -1
- package/dist-esm/Interfaces/Contracts/ContextTagKeys.js +1 -1
- package/dist-esm/Interfaces/Contracts/DataPointType.js +1 -1
- package/dist-esm/Interfaces/Contracts/DependencyKind.js +1 -1
- package/dist-esm/Interfaces/Contracts/DependencySourceType.js +1 -1
- package/dist-esm/Interfaces/Contracts/IBase.js +1 -1
- package/dist-esm/Interfaces/Contracts/IData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IDataPoint.js +1 -1
- package/dist-esm/Interfaces/Contracts/IDomain.js +1 -1
- package/dist-esm/Interfaces/Contracts/IEnvelope.js +1 -1
- package/dist-esm/Interfaces/Contracts/IEventData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IExceptionData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IExceptionDetails.js +1 -1
- package/dist-esm/Interfaces/Contracts/IMessageData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IMetricData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IPageViewData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IPageViewPerfData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
- package/dist-esm/Interfaces/Contracts/IStackFrame.js +1 -1
- package/dist-esm/Interfaces/Contracts/RequestData.js +1 -1
- package/dist-esm/Interfaces/Contracts/SeverityLevel.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/IThrottleMgr.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 +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 +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/ThrottleMgr.js +1 -1
- package/dist-esm/UrlHelperFuncs.js +1 -1
- package/dist-esm/Util.js +1 -1
- package/dist-esm/__DynamicConstants.js +1 -1
- package/dist-esm/applicationinsights-common.js +1 -1
- package/package.json +4 -4
- package/src/ConnectionStringParser.ts +8 -8
- package/src/HelperFuncs.ts +6 -6
- package/src/Interfaces/IConfig.ts +7 -7
- package/src/StorageHelperFuncs.ts +10 -10
- package/src/Telemetry/Common/DataSanitizer.ts +8 -8
- package/src/Telemetry/Common/Envelope.ts +11 -11
- package/src/Telemetry/Event.ts +11 -11
- package/src/Telemetry/Exception.ts +21 -21
- package/src/Telemetry/Metric.ts +12 -12
- package/src/Telemetry/PageView.ts +14 -14
- package/src/Telemetry/PageViewPerformance.ts +12 -12
- package/src/Telemetry/RemoteDependencyData.ts +12 -12
- package/src/Telemetry/Trace.ts +12 -12
- package/src/TelemetryItemCreator.ts +10 -10
- package/src/ThrottleMgr.ts +9 -9
- package/src/UrlHelperFuncs.ts +6 -6
- package/src/Util.ts +23 -23
- package/src/__DynamicConstants.ts +54 -54
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-common",
|
|
3
|
-
"version": "2.8.10-nightly.
|
|
3
|
+
"version": "2.8.10-nightly.2301-13",
|
|
4
4
|
"description": "Microsoft Application Insights Common JavaScript Library",
|
|
5
5
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
6
|
"author": "Microsoft Application Insights Team",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@microsoft/api-extractor": "^7.18.1",
|
|
33
33
|
"grunt": "^1.5.3",
|
|
34
34
|
"grunt-cli": "^1.4.3",
|
|
35
|
-
"grunt-contrib-qunit": "^
|
|
35
|
+
"grunt-contrib-qunit": "^6.2.1",
|
|
36
36
|
"@nevware21/grunt-ts-plugin": "^0.4.3",
|
|
37
37
|
"@nevware21/grunt-eslint-ts": "^0.2.2",
|
|
38
38
|
"@rollup/plugin-commonjs": "^18.0.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@rollup/plugin-replace": "^2.3.3",
|
|
41
41
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
42
42
|
"rollup": "^2.32.0",
|
|
43
|
-
"typescript": "^4.3
|
|
43
|
+
"typescript": "^4.9.3",
|
|
44
44
|
"tslib": "^2.0.0",
|
|
45
45
|
"globby": "^11.0.0",
|
|
46
46
|
"magic-string": "^0.25.7",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@microsoft/applicationinsights-shims": "2.0.2",
|
|
54
|
-
"@microsoft/applicationinsights-core-js": "2.8.10-nightly.
|
|
54
|
+
"@microsoft/applicationinsights-core-js": "2.8.10-nightly.2301-13",
|
|
55
55
|
"@microsoft/dynamicproto-js": "^1.1.7"
|
|
56
56
|
},
|
|
57
57
|
"license": "MIT",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { arrReduce, objKeys } from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
import { DEFAULT_BREEZE_ENDPOINT } from "./Constants";
|
|
6
|
-
import { ConnectionString, ConnectionStringKey } from "./Interfaces/ConnectionString";
|
|
7
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { arrReduce, objKeys } from "@microsoft/applicationinsights-core-js";
|
|
5
|
+
import { DEFAULT_BREEZE_ENDPOINT } from "./Constants";
|
|
6
|
+
import { ConnectionString, ConnectionStringKey } from "./Interfaces/ConnectionString";
|
|
7
|
+
|
|
8
8
|
const _FIELDS_SEPARATOR = ";";
|
|
9
9
|
const _FIELD_KEY_VALUE_SEPARATOR = "=";
|
|
10
10
|
|
|
@@ -44,4 +44,4 @@ export function parseConnectionString(connectionString?: string): ConnectionStri
|
|
|
44
44
|
|
|
45
45
|
export const ConnectionStringParser = {
|
|
46
46
|
parse: parseConnectionString
|
|
47
|
-
};
|
|
47
|
+
};
|
package/src/HelperFuncs.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { IPlugin, arrForEach, isString } from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { IPlugin, arrForEach, isString } from "@microsoft/applicationinsights-core-js";
|
|
5
|
+
|
|
6
6
|
const strEmpty = "";
|
|
7
7
|
|
|
8
8
|
export function stringToBoolOrDefault(str: any, defaultValue = false): boolean {
|
|
@@ -51,4 +51,4 @@ export function getExtensionByName(extensions: IPlugin[], identifier: string): I
|
|
|
51
51
|
|
|
52
52
|
export function isCrossOriginError(message: string|Event, url: string, lineNumber: number, columnNumber: number, error: Error | Event): boolean {
|
|
53
53
|
return !error && isString(message) && (message === "Script error." || message === "Script error");
|
|
54
|
-
}
|
|
54
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
import { IConfiguration, ICustomProperties, isNullOrUndefined } from "@microsoft/applicationinsights-core-js";
|
|
4
|
-
import { DistributedTracingModes } from "../Enums";
|
|
5
|
-
import { IRequestContext } from "./IRequestContext";
|
|
6
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { IConfiguration, ICustomProperties, isNullOrUndefined } from "@microsoft/applicationinsights-core-js";
|
|
4
|
+
import { DistributedTracingModes } from "../Enums";
|
|
5
|
+
import { IRequestContext } from "./IRequestContext";
|
|
6
|
+
|
|
7
7
|
/**
|
|
8
8
|
* Configuration settings for how telemetry is sent
|
|
9
9
|
* @export
|
|
@@ -393,4 +393,4 @@ export class ConfigurationManager {
|
|
|
393
393
|
|
|
394
394
|
return !isNullOrUndefined(configValue) ? configValue : defaultValue;
|
|
395
395
|
}
|
|
396
|
-
}
|
|
396
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
IDiagnosticLogger, _eInternalMessageId, _throwInternal, dumpObj, eLoggingSeverity, getExceptionName, getGlobal, getGlobalInst,
|
|
6
|
-
isNullOrUndefined, objForEachKey
|
|
7
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
8
|
-
import { StorageType } from "./Enums";
|
|
9
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
IDiagnosticLogger, _eInternalMessageId, _throwInternal, dumpObj, eLoggingSeverity, getExceptionName, getGlobal, getGlobalInst,
|
|
6
|
+
isNullOrUndefined, objForEachKey
|
|
7
|
+
} from "@microsoft/applicationinsights-core-js";
|
|
8
|
+
import { StorageType } from "./Enums";
|
|
9
|
+
|
|
10
10
|
let _canUseLocalStorage: boolean = undefined;
|
|
11
11
|
let _canUseSessionStorage: boolean = undefined;
|
|
12
12
|
|
|
@@ -220,4 +220,4 @@ export function utlRemoveSessionStorage(logger: IDiagnosticLogger, name: string)
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
return false;
|
|
223
|
-
}
|
|
223
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
IDiagnosticLogger, _eInternalMessageId, _throwInternal, eLoggingSeverity, getJSON, hasJSON, isObject, objForEachKey, strTrim
|
|
6
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
7
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
IDiagnosticLogger, _eInternalMessageId, _throwInternal, eLoggingSeverity, getJSON, hasJSON, isObject, objForEachKey, strTrim
|
|
6
|
+
} from "@microsoft/applicationinsights-core-js";
|
|
7
|
+
|
|
8
8
|
export const enum DataSanitizerValues {
|
|
9
9
|
/**
|
|
10
10
|
* Max length allowed for custom names.
|
|
@@ -284,4 +284,4 @@ export const DataSanitizer: IDataSanitizer = {
|
|
|
284
284
|
sanitizeInput: dataSanitizeInput,
|
|
285
285
|
padNumber: dsPadNumber,
|
|
286
286
|
trim: strTrim
|
|
287
|
-
};
|
|
287
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { IDiagnosticLogger, toISOString } from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
import { strNotSpecified } from "../../Constants";
|
|
6
|
-
import { FieldType } from "../../Enums";
|
|
7
|
-
import { IBase } from "../../Interfaces/Contracts/IBase";
|
|
8
|
-
import { IEnvelope } from "../../Interfaces/Telemetry/IEnvelope";
|
|
9
|
-
import { dataSanitizeString } from "./DataSanitizer";
|
|
10
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { IDiagnosticLogger, toISOString } from "@microsoft/applicationinsights-core-js";
|
|
5
|
+
import { strNotSpecified } from "../../Constants";
|
|
6
|
+
import { FieldType } from "../../Enums";
|
|
7
|
+
import { IBase } from "../../Interfaces/Contracts/IBase";
|
|
8
|
+
import { IEnvelope } from "../../Interfaces/Telemetry/IEnvelope";
|
|
9
|
+
import { dataSanitizeString } from "./DataSanitizer";
|
|
10
|
+
|
|
11
11
|
export class Envelope implements IEnvelope {
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -78,4 +78,4 @@ export class Envelope implements IEnvelope {
|
|
|
78
78
|
data: FieldType.Required
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
}
|
|
81
|
+
}
|
package/src/Telemetry/Event.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
import { strNotSpecified } from "../Constants";
|
|
6
|
-
import { FieldType } from "../Enums";
|
|
7
|
-
import { IEventData } from "../Interfaces/Contracts/IEventData";
|
|
8
|
-
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
9
|
-
import { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString } from "./Common/DataSanitizer";
|
|
10
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
5
|
+
import { strNotSpecified } from "../Constants";
|
|
6
|
+
import { FieldType } from "../Enums";
|
|
7
|
+
import { IEventData } from "../Interfaces/Contracts/IEventData";
|
|
8
|
+
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
9
|
+
import { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString } from "./Common/DataSanitizer";
|
|
10
|
+
|
|
11
11
|
export class Event implements IEventData, ISerializable {
|
|
12
12
|
public static envelopeType = "Microsoft.ApplicationInsights.{0}.Event";
|
|
13
13
|
public static dataType = "EventData";
|
|
@@ -49,4 +49,4 @@ export class Event implements IEventData, ISerializable {
|
|
|
49
49
|
_self.properties = dataSanitizeProperties(logger, properties);
|
|
50
50
|
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
IDiagnosticLogger, arrForEach, arrMap, isArray, isError, isFunction, isNullOrUndefined, isObject, isString, strTrim
|
|
6
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
7
|
-
import { strNotSpecified } from "../Constants";
|
|
8
|
-
import { FieldType } from "../Enums";
|
|
9
|
-
import { IExceptionData } from "../Interfaces/Contracts/IExceptionData";
|
|
10
|
-
import { IExceptionDetails } from "../Interfaces/Contracts/IExceptionDetails";
|
|
11
|
-
import { IStackFrame } from "../Interfaces/Contracts/IStackFrame";
|
|
12
|
-
import { SeverityLevel } from "../Interfaces/Contracts/SeverityLevel";
|
|
13
|
-
import {
|
|
14
|
-
IAutoExceptionTelemetry, IExceptionDetailsInternal, IExceptionInternal, IExceptionStackFrameInternal, IStackDetails
|
|
15
|
-
} from "../Interfaces/IExceptionTelemetry";
|
|
16
|
-
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
17
|
-
import {
|
|
18
|
-
dataSanitizeException, dataSanitizeMeasurements, dataSanitizeMessage, dataSanitizeProperties, dataSanitizeString
|
|
19
|
-
} from "./Common/DataSanitizer";
|
|
20
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
IDiagnosticLogger, arrForEach, arrMap, isArray, isError, isFunction, isNullOrUndefined, isObject, isString, strTrim
|
|
6
|
+
} from "@microsoft/applicationinsights-core-js";
|
|
7
|
+
import { strNotSpecified } from "../Constants";
|
|
8
|
+
import { FieldType } from "../Enums";
|
|
9
|
+
import { IExceptionData } from "../Interfaces/Contracts/IExceptionData";
|
|
10
|
+
import { IExceptionDetails } from "../Interfaces/Contracts/IExceptionDetails";
|
|
11
|
+
import { IStackFrame } from "../Interfaces/Contracts/IStackFrame";
|
|
12
|
+
import { SeverityLevel } from "../Interfaces/Contracts/SeverityLevel";
|
|
13
|
+
import {
|
|
14
|
+
IAutoExceptionTelemetry, IExceptionDetailsInternal, IExceptionInternal, IExceptionStackFrameInternal, IStackDetails
|
|
15
|
+
} from "../Interfaces/IExceptionTelemetry";
|
|
16
|
+
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
17
|
+
import {
|
|
18
|
+
dataSanitizeException, dataSanitizeMeasurements, dataSanitizeMessage, dataSanitizeProperties, dataSanitizeString
|
|
19
|
+
} from "./Common/DataSanitizer";
|
|
20
|
+
|
|
21
21
|
const NoMethod = "<no_method>";
|
|
22
22
|
const strError = "error";
|
|
23
23
|
const strStack = "stack";
|
|
@@ -671,4 +671,4 @@ export class _StackFrame implements IStackFrame, ISerializable {
|
|
|
671
671
|
line: _self.line
|
|
672
672
|
};
|
|
673
673
|
}
|
|
674
|
-
}
|
|
674
|
+
}
|
package/src/Telemetry/Metric.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
import { strNotSpecified } from "../Constants";
|
|
6
|
-
import { FieldType } from "../Enums";
|
|
7
|
-
import { IMetricData } from "../Interfaces/Contracts/IMetricData";
|
|
8
|
-
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
9
|
-
import { DataPoint } from "./Common/DataPoint";
|
|
10
|
-
import { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString } from "./Common/DataSanitizer";
|
|
11
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
5
|
+
import { strNotSpecified } from "../Constants";
|
|
6
|
+
import { FieldType } from "../Enums";
|
|
7
|
+
import { IMetricData } from "../Interfaces/Contracts/IMetricData";
|
|
8
|
+
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
9
|
+
import { DataPoint } from "./Common/DataPoint";
|
|
10
|
+
import { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString } from "./Common/DataSanitizer";
|
|
11
|
+
|
|
12
12
|
export class Metric implements IMetricData, ISerializable {
|
|
13
13
|
|
|
14
14
|
public static envelopeType = "Microsoft.ApplicationInsights.{0}.Metric";
|
|
@@ -58,4 +58,4 @@ export class Metric implements IMetricData, ISerializable {
|
|
|
58
58
|
_self.properties = dataSanitizeProperties(logger, properties);
|
|
59
59
|
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
60
60
|
}
|
|
61
|
-
}
|
|
61
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
import { strNotSpecified } from "../Constants";
|
|
6
|
-
import { FieldType } from "../Enums";
|
|
7
|
-
import { msToTimeSpan } from "../HelperFuncs";
|
|
8
|
-
import { IPageViewData } from "../Interfaces/Contracts/IPageViewData";
|
|
9
|
-
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
10
|
-
import {
|
|
11
|
-
dataSanitizeId, dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl
|
|
12
|
-
} from "./Common/DataSanitizer";
|
|
13
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
5
|
+
import { strNotSpecified } from "../Constants";
|
|
6
|
+
import { FieldType } from "../Enums";
|
|
7
|
+
import { msToTimeSpan } from "../HelperFuncs";
|
|
8
|
+
import { IPageViewData } from "../Interfaces/Contracts/IPageViewData";
|
|
9
|
+
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
10
|
+
import {
|
|
11
|
+
dataSanitizeId, dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl
|
|
12
|
+
} from "./Common/DataSanitizer";
|
|
13
|
+
|
|
14
14
|
export class PageView implements IPageViewData, ISerializable {
|
|
15
15
|
|
|
16
16
|
public static envelopeType = "Microsoft.ApplicationInsights.{0}.Pageview";
|
|
@@ -76,4 +76,4 @@ export class PageView implements IPageViewData, ISerializable {
|
|
|
76
76
|
_self.properties = dataSanitizeProperties(logger, properties);
|
|
77
77
|
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
78
78
|
}
|
|
79
|
-
}
|
|
79
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
import { strNotSpecified } from "../Constants";
|
|
6
|
-
import { FieldType } from "../Enums";
|
|
7
|
-
import { IPageViewPerfData } from "../Interfaces/Contracts/IPageViewPerfData";
|
|
8
|
-
import { IPageViewPerformanceTelemetry } from "../Interfaces/IPageViewPerformanceTelemetry";
|
|
9
|
-
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
10
|
-
import { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from "./Common/DataSanitizer";
|
|
11
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
5
|
+
import { strNotSpecified } from "../Constants";
|
|
6
|
+
import { FieldType } from "../Enums";
|
|
7
|
+
import { IPageViewPerfData } from "../Interfaces/Contracts/IPageViewPerfData";
|
|
8
|
+
import { IPageViewPerformanceTelemetry } from "../Interfaces/IPageViewPerformanceTelemetry";
|
|
9
|
+
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
10
|
+
import { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from "./Common/DataSanitizer";
|
|
11
|
+
|
|
12
12
|
export class PageViewPerformance implements IPageViewPerfData, ISerializable {
|
|
13
13
|
|
|
14
14
|
public static envelopeType = "Microsoft.ApplicationInsights.{0}.PageviewPerformance";
|
|
@@ -110,4 +110,4 @@ export class PageViewPerformance implements IPageViewPerfData, ISerializable {
|
|
|
110
110
|
_self.sentRequest = cs4BaseData.sentRequest;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
}
|
|
113
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
import { FieldType } from "../Enums";
|
|
6
|
-
import { msToTimeSpan } from "../HelperFuncs";
|
|
7
|
-
import { IRemoteDependencyData } from "../Interfaces/Contracts/IRemoteDependencyData";
|
|
8
|
-
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
9
|
-
import { AjaxHelperParseDependencyPath } from "../Util";
|
|
10
|
-
import { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from "./Common/DataSanitizer";
|
|
11
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
5
|
+
import { FieldType } from "../Enums";
|
|
6
|
+
import { msToTimeSpan } from "../HelperFuncs";
|
|
7
|
+
import { IRemoteDependencyData } from "../Interfaces/Contracts/IRemoteDependencyData";
|
|
8
|
+
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
9
|
+
import { AjaxHelperParseDependencyPath } from "../Util";
|
|
10
|
+
import { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from "./Common/DataSanitizer";
|
|
11
|
+
|
|
12
12
|
export class RemoteDependencyData implements IRemoteDependencyData, ISerializable {
|
|
13
13
|
|
|
14
14
|
public static envelopeType = "Microsoft.ApplicationInsights.{0}.RemoteDependency";
|
|
@@ -119,4 +119,4 @@ export class RemoteDependencyData implements IRemoteDependencyData, ISerializabl
|
|
|
119
119
|
_self.properties = dataSanitizeProperties(logger, properties);
|
|
120
120
|
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
121
121
|
}
|
|
122
|
-
}
|
|
122
|
+
}
|
package/src/Telemetry/Trace.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
import { strNotSpecified } from "../Constants";
|
|
6
|
-
import { FieldType } from "../Enums";
|
|
7
|
-
import { IMessageData } from "../Interfaces/Contracts/IMessageData";
|
|
8
|
-
import { SeverityLevel } from "../Interfaces/Contracts/SeverityLevel";
|
|
9
|
-
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
10
|
-
import { dataSanitizeMeasurements, dataSanitizeMessage, dataSanitizeProperties } from "./Common/DataSanitizer";
|
|
11
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
5
|
+
import { strNotSpecified } from "../Constants";
|
|
6
|
+
import { FieldType } from "../Enums";
|
|
7
|
+
import { IMessageData } from "../Interfaces/Contracts/IMessageData";
|
|
8
|
+
import { SeverityLevel } from "../Interfaces/Contracts/SeverityLevel";
|
|
9
|
+
import { ISerializable } from "../Interfaces/Telemetry/ISerializable";
|
|
10
|
+
import { dataSanitizeMeasurements, dataSanitizeMessage, dataSanitizeProperties } from "./Common/DataSanitizer";
|
|
11
|
+
|
|
12
12
|
export class Trace implements IMessageData, ISerializable {
|
|
13
13
|
|
|
14
14
|
public static envelopeType = "Microsoft.ApplicationInsights.{0}.Message";
|
|
@@ -61,4 +61,4 @@ export class Trace implements IMessageData, ISerializable {
|
|
|
61
61
|
_self.severityLevel = severityLevel;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
}
|
|
64
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
IDiagnosticLogger, ITelemetryItem, isNullOrUndefined, objForEachKey, throwError, toISOString
|
|
6
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
7
|
-
import { strIkey, strNotSpecified } from "./Constants";
|
|
8
|
-
import { dataSanitizeString } from "./Telemetry/Common/DataSanitizer";
|
|
9
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
IDiagnosticLogger, ITelemetryItem, isNullOrUndefined, objForEachKey, throwError, toISOString
|
|
6
|
+
} from "@microsoft/applicationinsights-core-js";
|
|
7
|
+
import { strIkey, strNotSpecified } from "./Constants";
|
|
8
|
+
import { dataSanitizeString } from "./Telemetry/Common/DataSanitizer";
|
|
9
|
+
|
|
10
10
|
/**
|
|
11
11
|
* Create a telemetry item that the 1DS channel understands
|
|
12
12
|
* @param item domain specific properties; part B
|
|
@@ -72,4 +72,4 @@ export class TelemetryItemCreator {
|
|
|
72
72
|
*/
|
|
73
73
|
|
|
74
74
|
public static create = createTelemetryItem;
|
|
75
|
-
}
|
|
75
|
+
}
|
package/src/ThrottleMgr.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IAppInsightsCore, IDiagnosticLogger, _eInternalMessageId, _throwInternal, arrForEach, eLoggingSeverity, isNotNullOrUndefined,
|
|
3
|
-
isNullOrUndefined, randomValue, safeGetLogger, strTrim
|
|
4
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
import { IThrottleMsgKey } from "./Enums";
|
|
6
|
-
import { IThrottleLocalStorageObj, IThrottleMgrConfig, IThrottleResult } from "./Interfaces/IThrottleMgr";
|
|
7
|
-
import { utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage } from "./StorageHelperFuncs";
|
|
8
|
-
|
|
1
|
+
import {
|
|
2
|
+
IAppInsightsCore, IDiagnosticLogger, _eInternalMessageId, _throwInternal, arrForEach, eLoggingSeverity, isNotNullOrUndefined,
|
|
3
|
+
isNullOrUndefined, randomValue, safeGetLogger, strTrim
|
|
4
|
+
} from "@microsoft/applicationinsights-core-js";
|
|
5
|
+
import { IThrottleMsgKey } from "./Enums";
|
|
6
|
+
import { IThrottleLocalStorageObj, IThrottleMgrConfig, IThrottleResult } from "./Interfaces/IThrottleMgr";
|
|
7
|
+
import { utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage } from "./StorageHelperFuncs";
|
|
8
|
+
|
|
9
9
|
const THROTTLE_STORAGE_PREFIX = "appInsightsThrottle";
|
|
10
10
|
|
|
11
11
|
interface SendMsgParameter {
|
|
@@ -282,4 +282,4 @@ export class ThrottleMgr {
|
|
|
282
282
|
return randomValue(1000000) <= _config.limit.samplingRate;
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
}
|
|
285
|
+
}
|
package/src/UrlHelperFuncs.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { getDocument, isString } from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import { getDocument, isString } from "@microsoft/applicationinsights-core-js";
|
|
5
|
+
|
|
6
6
|
let _document: any = getDocument() || {};
|
|
7
7
|
|
|
8
8
|
let _htmlAnchorIdx: number = 0;
|
|
@@ -98,4 +98,4 @@ export function urlParseFullHost(url: string, inclPort?: boolean) {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
return result;
|
|
101
|
-
}
|
|
101
|
+
}
|
package/src/Util.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
IDiagnosticLogger, IDistributedTraceContext, IPlugin, arrForEach, arrIndexOf, attachEvent, canUseCookies as coreCanUseCookies, dateNow,
|
|
6
|
-
deleteCookie as coreDeleteCookie, disableCookies as coreDisableCookies, dumpObj, generateW3CId, getCookie as coreGetCookie,
|
|
7
|
-
getExceptionName as coreGetExceptionName, getIEVersion, getPerformance, isArray, isBeaconsSupported, isDate, isError, isNullOrUndefined,
|
|
8
|
-
isValidSpanId, isValidTraceId, newId, random32, setCookie as coreSetCookie, strTrim, toISOString, uaDisallowsSameSiteNone
|
|
9
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
10
|
-
import { DEFAULT_BREEZE_ENDPOINT, DEFAULT_BREEZE_PATH, strNotSpecified } from "./Constants";
|
|
11
|
-
import { createDomEvent } from "./DomHelperFuncs";
|
|
12
|
-
import { getExtensionByName, isCrossOriginError, msToTimeSpan, stringToBoolOrDefault } from "./HelperFuncs";
|
|
13
|
-
import { ITelemetryTrace } from "./Interfaces/Context/ITelemetryTrace";
|
|
14
|
-
import { ICorrelationConfig } from "./Interfaces/ICorrelationConfig";
|
|
15
|
-
import { RequestHeaders, eRequestHeaders } from "./RequestResponseHeaders";
|
|
16
|
-
import {
|
|
17
|
-
utlCanUseLocalStorage, utlCanUseSessionStorage, utlDisableStorage, utlGetLocalStorage, utlGetSessionStorage, utlGetSessionStorageKeys,
|
|
18
|
-
utlRemoveSessionStorage, utlRemoveStorage, utlSetLocalStorage, utlSetSessionStorage
|
|
19
|
-
} from "./StorageHelperFuncs";
|
|
20
|
-
import { dataSanitizeString } from "./Telemetry/Common/DataSanitizer";
|
|
21
|
-
import { urlGetAbsoluteUrl, urlGetCompleteUrl, urlGetPathName, urlParseFullHost, urlParseHost, urlParseUrl } from "./UrlHelperFuncs";
|
|
22
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
IDiagnosticLogger, IDistributedTraceContext, IPlugin, arrForEach, arrIndexOf, attachEvent, canUseCookies as coreCanUseCookies, dateNow,
|
|
6
|
+
deleteCookie as coreDeleteCookie, disableCookies as coreDisableCookies, dumpObj, generateW3CId, getCookie as coreGetCookie,
|
|
7
|
+
getExceptionName as coreGetExceptionName, getIEVersion, getPerformance, isArray, isBeaconsSupported, isDate, isError, isNullOrUndefined,
|
|
8
|
+
isValidSpanId, isValidTraceId, newId, random32, setCookie as coreSetCookie, strTrim, toISOString, uaDisallowsSameSiteNone
|
|
9
|
+
} from "@microsoft/applicationinsights-core-js";
|
|
10
|
+
import { DEFAULT_BREEZE_ENDPOINT, DEFAULT_BREEZE_PATH, strNotSpecified } from "./Constants";
|
|
11
|
+
import { createDomEvent } from "./DomHelperFuncs";
|
|
12
|
+
import { getExtensionByName, isCrossOriginError, msToTimeSpan, stringToBoolOrDefault } from "./HelperFuncs";
|
|
13
|
+
import { ITelemetryTrace } from "./Interfaces/Context/ITelemetryTrace";
|
|
14
|
+
import { ICorrelationConfig } from "./Interfaces/ICorrelationConfig";
|
|
15
|
+
import { RequestHeaders, eRequestHeaders } from "./RequestResponseHeaders";
|
|
16
|
+
import {
|
|
17
|
+
utlCanUseLocalStorage, utlCanUseSessionStorage, utlDisableStorage, utlGetLocalStorage, utlGetSessionStorage, utlGetSessionStorageKeys,
|
|
18
|
+
utlRemoveSessionStorage, utlRemoveStorage, utlSetLocalStorage, utlSetSessionStorage
|
|
19
|
+
} from "./StorageHelperFuncs";
|
|
20
|
+
import { dataSanitizeString } from "./Telemetry/Common/DataSanitizer";
|
|
21
|
+
import { urlGetAbsoluteUrl, urlGetCompleteUrl, urlGetPathName, urlParseFullHost, urlParseHost, urlParseUrl } from "./UrlHelperFuncs";
|
|
22
|
+
|
|
23
23
|
// listing only non-geo specific locations
|
|
24
24
|
const _internalEndpoints: string[] = [
|
|
25
25
|
DEFAULT_BREEZE_ENDPOINT + DEFAULT_BREEZE_PATH,
|
|
@@ -533,4 +533,4 @@ export function createDistributedTraceContextFromTrace(telemetryTrace?: ITelemet
|
|
|
533
533
|
trace.traceFlags = newTraceFlags
|
|
534
534
|
}
|
|
535
535
|
};
|
|
536
|
-
}
|
|
536
|
+
}
|