@microsoft/applicationinsights-common 2.8.0-beta.2203-15 → 2.8.0-nightly.2204-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-common.integrity.json +9 -9
- package/browser/applicationinsights-common.js +157 -295
- 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 +2805 -1244
- package/dist/applicationinsights-common.api.md +78 -35
- package/dist/applicationinsights-common.d.ts +494 -282
- package/dist/applicationinsights-common.js +157 -295
- 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 +494 -282
- 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/ITraceTelemetry.js +1 -1
- package/dist-esm/Interfaces/PartAExtensions.js +2 -2
- package/dist-esm/Interfaces/PartAExtensions.js.map +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 +6 -11
- package/dist-esm/Telemetry/Common/Data.js.map +1 -1
- package/dist-esm/Telemetry/Common/DataPoint.js +8 -9
- package/dist-esm/Telemetry/Common/DataPoint.js.map +1 -1
- package/dist-esm/Telemetry/Common/DataSanitizer.js +1 -1
- package/dist-esm/Telemetry/Common/Envelope.js +12 -12
- package/dist-esm/Telemetry/Common/Envelope.js.map +1 -1
- package/dist-esm/Telemetry/Event.js +9 -12
- package/dist-esm/Telemetry/Event.js.map +1 -1
- package/dist-esm/Telemetry/Exception.js +74 -81
- package/dist-esm/Telemetry/Exception.js.map +1 -1
- package/dist-esm/Telemetry/Metric.js +9 -12
- package/dist-esm/Telemetry/Metric.js.map +1 -1
- package/dist-esm/Telemetry/PageView.js +12 -15
- package/dist-esm/Telemetry/PageView.js.map +1 -1
- package/dist-esm/Telemetry/PageViewPerformance.js +16 -19
- package/dist-esm/Telemetry/PageViewPerformance.js.map +1 -1
- package/dist-esm/Telemetry/RemoteDependencyData.js +17 -20
- package/dist-esm/Telemetry/RemoteDependencyData.js.map +1 -1
- package/dist-esm/Telemetry/Trace.js +10 -13
- package/dist-esm/Telemetry/Trace.js.map +1 -1
- package/dist-esm/TelemetryItemCreator.js +1 -1
- package/dist-esm/UrlHelperFuncs.js +1 -1
- package/dist-esm/Util.js +1 -1
- package/dist-esm/applicationinsights-common.js +3 -6
- package/dist-esm/applicationinsights-common.js.map +1 -1
- package/package.json +3 -3
- package/src/Interfaces/IExceptionTelemetry.ts +1 -1
- package/src/Interfaces/ITraceTelemetry.ts +1 -1
- package/src/Interfaces/PartAExtensions.ts +1 -1
- package/src/Interfaces/Telemetry/IEnvelope.ts +35 -3
- package/src/Telemetry/Common/Data.ts +12 -4
- package/src/Telemetry/Common/DataPoint.ts +38 -2
- package/src/Telemetry/Common/Envelope.ts +51 -10
- package/src/Telemetry/Event.ts +30 -12
- package/src/Telemetry/Exception.ts +158 -71
- package/src/Telemetry/Metric.ts +27 -7
- package/src/Telemetry/PageView.ts +45 -10
- package/src/Telemetry/PageViewPerformance.ts +75 -13
- package/src/Telemetry/RemoteDependencyData.ts +70 -15
- package/src/Telemetry/Trace.ts +34 -8
- package/src/applicationinsights-common.ts +5 -5
- package/types/Interfaces/IExceptionTelemetry.d.ts +1 -1
- package/types/Interfaces/ITraceTelemetry.d.ts +1 -1
- package/types/Interfaces/PartAExtensions.d.ts +1 -1
- package/types/Interfaces/Telemetry/IEnvelope.d.ts +24 -0
- package/types/Telemetry/Common/Data.d.ts +10 -2
- package/types/Telemetry/Common/DataPoint.d.ts +31 -2
- package/types/Telemetry/Common/Envelope.d.ts +35 -4
- package/types/Telemetry/Event.d.ts +19 -3
- package/types/Telemetry/Exception.d.ts +75 -7
- package/types/Telemetry/Metric.d.ts +19 -2
- package/types/Telemetry/PageView.d.ts +30 -2
- package/types/Telemetry/PageViewPerformance.d.ts +50 -2
- package/types/Telemetry/RemoteDependencyData.d.ts +46 -2
- package/types/Telemetry/Trace.d.ts +23 -3
- package/types/applicationinsights-common.d.ts +5 -5
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/Interfaces/Contracts/Generated/AvailabilityData.js +0 -27
- package/dist-esm/Interfaces/Contracts/Generated/AvailabilityData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/Base.js +0 -17
- package/dist-esm/Interfaces/Contracts/Generated/Base.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/ContextTagKeys.js +0 -89
- package/dist-esm/Interfaces/Contracts/Generated/ContextTagKeys.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/Data.js +0 -21
- package/dist-esm/Interfaces/Contracts/Generated/Data.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/DataPoint.js +0 -21
- package/dist-esm/Interfaces/Contracts/Generated/DataPoint.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/DataPointType.js +0 -16
- package/dist-esm/Interfaces/Contracts/Generated/DataPointType.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/DependencyKind.js +0 -17
- package/dist-esm/Interfaces/Contracts/Generated/DependencyKind.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/DependencySourceType.js +0 -17
- package/dist-esm/Interfaces/Contracts/Generated/DependencySourceType.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/Domain.js +0 -8
- package/dist-esm/Interfaces/Contracts/Generated/Domain.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/Envelope.js +0 -28
- package/dist-esm/Interfaces/Contracts/Generated/Envelope.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/EventData.js +0 -28
- package/dist-esm/Interfaces/Contracts/Generated/EventData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js +0 -32
- package/dist-esm/Interfaces/Contracts/Generated/ExceptionData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js +0 -24
- package/dist-esm/Interfaces/Contracts/Generated/ExceptionDetails.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/MessageData.js +0 -28
- package/dist-esm/Interfaces/Contracts/Generated/MessageData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/MetricData.js +0 -32
- package/dist-esm/Interfaces/Contracts/Generated/MetricData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/PageViewData.js +0 -34
- package/dist-esm/Interfaces/Contracts/Generated/PageViewData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js +0 -34
- package/dist-esm/Interfaces/Contracts/Generated/PageViewPerfData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js +0 -32
- package/dist-esm/Interfaces/Contracts/Generated/RemoteDependencyData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/RequestData.js +0 -28
- package/dist-esm/Interfaces/Contracts/Generated/RequestData.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/SeverityLevel.js +0 -19
- package/dist-esm/Interfaces/Contracts/Generated/SeverityLevel.js.map +0 -1
- package/dist-esm/Interfaces/Contracts/Generated/StackFrame.js +0 -17
- package/dist-esm/Interfaces/Contracts/Generated/StackFrame.js.map +0 -1
- package/dist-esm/Telemetry/Common/Base.js +0 -22
- package/dist-esm/Telemetry/Common/Base.js.map +0 -1
- package/src/Interfaces/Contracts/Generated/AvailabilityData.ts +0 -57
- package/src/Interfaces/Contracts/Generated/Base.ts +0 -18
- package/src/Interfaces/Contracts/Generated/ContextTagKeys.ts +0 -299
- package/src/Interfaces/Contracts/Generated/Data.ts +0 -26
- package/src/Interfaces/Contracts/Generated/DataPoint.ts +0 -44
- package/src/Interfaces/Contracts/Generated/DataPointType.ts +0 -11
- package/src/Interfaces/Contracts/Generated/DependencyKind.ts +0 -12
- package/src/Interfaces/Contracts/Generated/DependencySourceType.ts +0 -12
- package/src/Interfaces/Contracts/Generated/Domain.ts +0 -10
- package/src/Interfaces/Contracts/Generated/Envelope.ts +0 -50
- package/src/Interfaces/Contracts/Generated/EventData.ts +0 -33
- package/src/Interfaces/Contracts/Generated/ExceptionData.ts +0 -40
- package/src/Interfaces/Contracts/Generated/ExceptionDetails.ts +0 -46
- package/src/Interfaces/Contracts/Generated/MessageData.ts +0 -39
- package/src/Interfaces/Contracts/Generated/MetricData.ts +0 -34
- package/src/Interfaces/Contracts/Generated/PageViewData.ts +0 -50
- package/src/Interfaces/Contracts/Generated/PageViewPerfData.ts +0 -70
- package/src/Interfaces/Contracts/Generated/RemoteDependencyData.ts +0 -68
- package/src/Interfaces/Contracts/Generated/RequestData.ts +0 -50
- package/src/Interfaces/Contracts/Generated/SeverityLevel.ts +0 -15
- package/src/Interfaces/Contracts/Generated/StackFrame.ts +0 -34
- package/src/Telemetry/Common/Base.ts +0 -14
- package/types/Interfaces/Contracts/Generated/AvailabilityData.d.ts +0 -42
- package/types/Interfaces/Contracts/Generated/Base.d.ts +0 -10
- package/types/Interfaces/Contracts/Generated/ContextTagKeys.d.ts +0 -175
- package/types/Interfaces/Contracts/Generated/Data.d.ts +0 -15
- package/types/Interfaces/Contracts/Generated/DataPoint.d.ts +0 -34
- package/types/Interfaces/Contracts/Generated/DataPointType.d.ts +0 -7
- package/types/Interfaces/Contracts/Generated/DependencyKind.d.ts +0 -8
- package/types/Interfaces/Contracts/Generated/DependencySourceType.d.ts +0 -8
- package/types/Interfaces/Contracts/Generated/Domain.d.ts +0 -5
- package/types/Interfaces/Contracts/Generated/Envelope.d.ts +0 -38
- package/types/Interfaces/Contracts/Generated/EventData.d.ts +0 -23
- package/types/Interfaces/Contracts/Generated/ExceptionData.d.ts +0 -29
- package/types/Interfaces/Contracts/Generated/ExceptionDetails.d.ts +0 -34
- package/types/Interfaces/Contracts/Generated/MessageData.d.ts +0 -28
- package/types/Interfaces/Contracts/Generated/MetricData.d.ts +0 -24
- package/types/Interfaces/Contracts/Generated/PageViewData.d.ts +0 -35
- package/types/Interfaces/Contracts/Generated/PageViewPerfData.d.ts +0 -51
- package/types/Interfaces/Contracts/Generated/RemoteDependencyData.d.ts +0 -51
- package/types/Interfaces/Contracts/Generated/RequestData.d.ts +0 -38
- package/types/Interfaces/Contracts/Generated/SeverityLevel.d.ts +0 -10
- package/types/Interfaces/Contracts/Generated/StackFrame.d.ts +0 -25
- package/types/Telemetry/Common/Base.d.ts +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageView.js.map","sources":["PageView.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport {
|
|
1
|
+
{"version":3,"file":"PageView.js.map","sources":["PageView.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { dataSanitizeId, dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from \"./Common/DataSanitizer\";\r\nimport { msToTimeSpan } from \"../HelperFuncs\";\r\nimport { strNotSpecified } from \"../Constants\";\r\nvar PageView = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n function PageView(logger, name, url, durationMs, properties, measurements, id) {\r\n this.aiDataContract = {\r\n ver: 1 /* Required */,\r\n name: 0 /* Default */,\r\n url: 0 /* Default */,\r\n duration: 0 /* Default */,\r\n properties: 0 /* Default */,\r\n measurements: 0 /* Default */,\r\n id: 0 /* Default */\r\n };\r\n var _self = this;\r\n _self.ver = 2;\r\n _self.id = dataSanitizeId(logger, id);\r\n _self.url = dataSanitizeUrl(logger, url);\r\n _self.name = dataSanitizeString(logger, name) || strNotSpecified;\r\n if (!isNaN(durationMs)) {\r\n _self.duration = msToTimeSpan(durationMs);\r\n }\r\n _self.properties = dataSanitizeProperties(logger, properties);\r\n _self.measurements = dataSanitizeMeasurements(logger, measurements);\r\n }\r\n PageView.envelopeType = \"Microsoft.ApplicationInsights.{0}.Pageview\";\r\n PageView.dataType = \"PageviewData\";\r\n return PageView;\r\n}());\r\nexport { PageView };\r\n//# sourceMappingURL=PageView.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;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"}
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 2.8.0-
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
|
|
8
|
-
import { PageViewPerfData } from "../Interfaces/Contracts/Generated/PageViewPerfData";
|
|
9
7
|
import { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from "./Common/DataSanitizer";
|
|
10
8
|
import { strNotSpecified } from "../Constants";
|
|
11
|
-
var PageViewPerformance = /** @class */ (function (
|
|
12
|
-
__extends(PageViewPerformance, _super);
|
|
9
|
+
var PageViewPerformance = /** @class */ (function () {
|
|
13
10
|
/**
|
|
14
11
|
* Constructs a new instance of the PageEventTelemetry object
|
|
15
12
|
*/
|
|
16
13
|
function PageViewPerformance(logger, name, url, unused, properties, measurements, cs4BaseData) {
|
|
17
|
-
|
|
18
|
-
_this.aiDataContract = {
|
|
14
|
+
this.aiDataContract = {
|
|
19
15
|
ver: 1 /* Required */,
|
|
20
16
|
name: 0 /* Default */,
|
|
21
17
|
url: 0 /* Default */,
|
|
@@ -28,23 +24,24 @@ var PageViewPerformance = /** @class */ (function (_super) {
|
|
|
28
24
|
properties: 0 /* Default */,
|
|
29
25
|
measurements: 0 /* Default */
|
|
30
26
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
var _self = this;
|
|
28
|
+
_self.ver = 2;
|
|
29
|
+
_self.url = dataSanitizeUrl(logger, url);
|
|
30
|
+
_self.name = dataSanitizeString(logger, name) || strNotSpecified;
|
|
31
|
+
_self.properties = dataSanitizeProperties(logger, properties);
|
|
32
|
+
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
35
33
|
if (cs4BaseData) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
_self.domProcessing = cs4BaseData.domProcessing;
|
|
35
|
+
_self.duration = cs4BaseData.duration;
|
|
36
|
+
_self.networkConnect = cs4BaseData.networkConnect;
|
|
37
|
+
_self.perfTotal = cs4BaseData.perfTotal;
|
|
38
|
+
_self.receivedResponse = cs4BaseData.receivedResponse;
|
|
39
|
+
_self.sentRequest = cs4BaseData.sentRequest;
|
|
42
40
|
}
|
|
43
|
-
return _this;
|
|
44
41
|
}
|
|
45
42
|
PageViewPerformance.envelopeType = "Microsoft.ApplicationInsights.{0}.PageviewPerformance";
|
|
46
43
|
PageViewPerformance.dataType = "PageviewPerformanceData";
|
|
47
44
|
return PageViewPerformance;
|
|
48
|
-
}(
|
|
45
|
+
}());
|
|
49
46
|
export { PageViewPerformance };
|
|
50
47
|
//# sourceMappingURL=PageViewPerformance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageViewPerformance.js.map","sources":["PageViewPerformance.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport {
|
|
1
|
+
{"version":3,"file":"PageViewPerformance.js.map","sources":["PageViewPerformance.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from \"./Common/DataSanitizer\";\r\nimport { strNotSpecified } from \"../Constants\";\r\nvar PageViewPerformance = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n function PageViewPerformance(logger, name, url, unused, properties, measurements, cs4BaseData) {\r\n this.aiDataContract = {\r\n ver: 1 /* Required */,\r\n name: 0 /* Default */,\r\n url: 0 /* Default */,\r\n duration: 0 /* Default */,\r\n perfTotal: 0 /* Default */,\r\n networkConnect: 0 /* Default */,\r\n sentRequest: 0 /* Default */,\r\n receivedResponse: 0 /* Default */,\r\n domProcessing: 0 /* Default */,\r\n properties: 0 /* Default */,\r\n measurements: 0 /* Default */\r\n };\r\n var _self = this;\r\n _self.ver = 2;\r\n _self.url = dataSanitizeUrl(logger, url);\r\n _self.name = dataSanitizeString(logger, name) || strNotSpecified;\r\n _self.properties = dataSanitizeProperties(logger, properties);\r\n _self.measurements = dataSanitizeMeasurements(logger, measurements);\r\n if (cs4BaseData) {\r\n _self.domProcessing = cs4BaseData.domProcessing;\r\n _self.duration = cs4BaseData.duration;\r\n _self.networkConnect = cs4BaseData.networkConnect;\r\n _self.perfTotal = cs4BaseData.perfTotal;\r\n _self.receivedResponse = cs4BaseData.receivedResponse;\r\n _self.sentRequest = cs4BaseData.sentRequest;\r\n }\r\n }\r\n PageViewPerformance.envelopeType = \"Microsoft.ApplicationInsights.{0}.PageviewPerformance\";\r\n PageViewPerformance.dataType = \"PageviewPerformanceData\";\r\n return PageViewPerformance;\r\n}());\r\nexport { PageViewPerformance };\r\n//# sourceMappingURL=PageViewPerformance.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;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"}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 2.8.0-
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
|
|
8
7
|
import { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from "./Common/DataSanitizer";
|
|
9
8
|
import { AjaxHelperParseDependencyPath } from "../Util";
|
|
10
|
-
import { RemoteDependencyData as GeneratedRemoteDependencyData } from "../Interfaces/Contracts/Generated/RemoteDependencyData";
|
|
11
9
|
import { msToTimeSpan } from "../HelperFuncs";
|
|
12
|
-
var RemoteDependencyData = /** @class */ (function (
|
|
13
|
-
__extends(RemoteDependencyData, _super);
|
|
10
|
+
var RemoteDependencyData = /** @class */ (function () {
|
|
14
11
|
/**
|
|
15
12
|
* Constructs a new instance of the RemoteDependencyData object
|
|
16
13
|
*/
|
|
17
14
|
function RemoteDependencyData(logger, id, absoluteUrl, commandName, value, success, resultCode, method, requestAPI, correlationContext, properties, measurements) {
|
|
18
15
|
if (requestAPI === void 0) { requestAPI = "Ajax"; }
|
|
19
|
-
|
|
20
|
-
_this.aiDataContract = {
|
|
16
|
+
this.aiDataContract = {
|
|
21
17
|
id: 1 /* Required */,
|
|
22
18
|
ver: 1 /* Required */,
|
|
23
19
|
name: 0 /* Default */,
|
|
@@ -40,25 +36,26 @@ var RemoteDependencyData = /** @class */ (function (_super) {
|
|
|
40
36
|
commandName: 0 /* Default */,
|
|
41
37
|
dependencyTypeName: 0 /* Default */
|
|
42
38
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
var _self = this;
|
|
40
|
+
_self.ver = 2;
|
|
41
|
+
_self.id = id;
|
|
42
|
+
_self.duration = msToTimeSpan(value);
|
|
43
|
+
_self.success = success;
|
|
44
|
+
_self.resultCode = resultCode + "";
|
|
45
|
+
_self.type = dataSanitizeString(logger, requestAPI);
|
|
48
46
|
var dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
_self.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data; // get a value from hosturl if commandName not available
|
|
48
|
+
_self.target = dataSanitizeString(logger, dependencyFields.target);
|
|
51
49
|
if (correlationContext) {
|
|
52
|
-
|
|
50
|
+
_self.target = "".concat(_self.target, " | ").concat(correlationContext);
|
|
53
51
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return _this;
|
|
52
|
+
_self.name = dataSanitizeString(logger, dependencyFields.name);
|
|
53
|
+
_self.properties = dataSanitizeProperties(logger, properties);
|
|
54
|
+
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
58
55
|
}
|
|
59
56
|
RemoteDependencyData.envelopeType = "Microsoft.ApplicationInsights.{0}.RemoteDependency";
|
|
60
57
|
RemoteDependencyData.dataType = "RemoteDependencyData";
|
|
61
58
|
return RemoteDependencyData;
|
|
62
|
-
}(
|
|
59
|
+
}());
|
|
63
60
|
export { RemoteDependencyData };
|
|
64
61
|
//# sourceMappingURL=RemoteDependencyData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteDependencyData.js.map","sources":["RemoteDependencyData.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport {
|
|
1
|
+
{"version":3,"file":"RemoteDependencyData.js.map","sources":["RemoteDependencyData.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { dataSanitizeMeasurements, dataSanitizeProperties, dataSanitizeString, dataSanitizeUrl } from \"./Common/DataSanitizer\";\r\nimport { AjaxHelperParseDependencyPath } from \"../Util\";\r\nimport { msToTimeSpan } from \"../HelperFuncs\";\r\nvar RemoteDependencyData = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the RemoteDependencyData object\r\n */\r\n function RemoteDependencyData(logger, id, absoluteUrl, commandName, value, success, resultCode, method, requestAPI, correlationContext, properties, measurements) {\r\n if (requestAPI === void 0) { requestAPI = \"Ajax\"; }\r\n this.aiDataContract = {\r\n id: 1 /* Required */,\r\n ver: 1 /* Required */,\r\n name: 0 /* Default */,\r\n resultCode: 0 /* Default */,\r\n duration: 0 /* Default */,\r\n success: 0 /* Default */,\r\n data: 0 /* Default */,\r\n target: 0 /* Default */,\r\n type: 0 /* Default */,\r\n properties: 0 /* Default */,\r\n measurements: 0 /* Default */,\r\n kind: 0 /* Default */,\r\n value: 0 /* Default */,\r\n count: 0 /* Default */,\r\n min: 0 /* Default */,\r\n max: 0 /* Default */,\r\n stdDev: 0 /* Default */,\r\n dependencyKind: 0 /* Default */,\r\n dependencySource: 0 /* Default */,\r\n commandName: 0 /* Default */,\r\n dependencyTypeName: 0 /* Default */\r\n };\r\n var _self = this;\r\n _self.ver = 2;\r\n _self.id = id;\r\n _self.duration = msToTimeSpan(value);\r\n _self.success = success;\r\n _self.resultCode = resultCode + \"\";\r\n _self.type = dataSanitizeString(logger, requestAPI);\r\n var dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);\r\n _self.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data; // get a value from hosturl if commandName not available\r\n _self.target = dataSanitizeString(logger, dependencyFields.target);\r\n if (correlationContext) {\r\n _self.target = \"\".concat(_self.target, \" | \").concat(correlationContext);\r\n }\r\n _self.name = dataSanitizeString(logger, dependencyFields.name);\r\n _self.properties = dataSanitizeProperties(logger, properties);\r\n _self.measurements = dataSanitizeMeasurements(logger, measurements);\r\n }\r\n RemoteDependencyData.envelopeType = \"Microsoft.ApplicationInsights.{0}.RemoteDependency\";\r\n RemoteDependencyData.dataType = \"RemoteDependencyData\";\r\n return RemoteDependencyData;\r\n}());\r\nexport { RemoteDependencyData };\r\n//# sourceMappingURL=RemoteDependencyData.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;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"}
|
|
@@ -1,38 +1,35 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 2.8.0-
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
|
|
8
|
-
import { MessageData } from "../Interfaces/Contracts/Generated/MessageData";
|
|
9
7
|
import { dataSanitizeMessage, dataSanitizeProperties, dataSanitizeMeasurements } from "./Common/DataSanitizer";
|
|
10
8
|
import { strNotSpecified } from "../Constants";
|
|
11
|
-
var Trace = /** @class */ (function (
|
|
12
|
-
__extends(Trace, _super);
|
|
9
|
+
var Trace = /** @class */ (function () {
|
|
13
10
|
/**
|
|
14
11
|
* Constructs a new instance of the TraceTelemetry object
|
|
15
12
|
*/
|
|
16
13
|
function Trace(logger, message, severityLevel, properties, measurements) {
|
|
17
|
-
|
|
18
|
-
_this.aiDataContract = {
|
|
14
|
+
this.aiDataContract = {
|
|
19
15
|
ver: 1 /* Required */,
|
|
20
16
|
message: 1 /* Required */,
|
|
21
17
|
severityLevel: 0 /* Default */,
|
|
22
18
|
properties: 0 /* Default */
|
|
23
19
|
};
|
|
20
|
+
var _self = this;
|
|
21
|
+
_self.ver = 2;
|
|
24
22
|
message = message || strNotSpecified;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
_self.message = dataSanitizeMessage(logger, message);
|
|
24
|
+
_self.properties = dataSanitizeProperties(logger, properties);
|
|
25
|
+
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
28
26
|
if (severityLevel) {
|
|
29
|
-
|
|
27
|
+
_self.severityLevel = severityLevel;
|
|
30
28
|
}
|
|
31
|
-
return _this;
|
|
32
29
|
}
|
|
33
30
|
Trace.envelopeType = "Microsoft.ApplicationInsights.{0}.Message";
|
|
34
31
|
Trace.dataType = "MessageData";
|
|
35
32
|
return Trace;
|
|
36
|
-
}(
|
|
33
|
+
}());
|
|
37
34
|
export { Trace };
|
|
38
35
|
//# sourceMappingURL=Trace.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trace.js.map","sources":["Trace.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport {
|
|
1
|
+
{"version":3,"file":"Trace.js.map","sources":["Trace.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { dataSanitizeMessage, dataSanitizeProperties, dataSanitizeMeasurements } from \"./Common/DataSanitizer\";\r\nimport { strNotSpecified } from \"../Constants\";\r\nvar Trace = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the TraceTelemetry object\r\n */\r\n function Trace(logger, message, severityLevel, properties, measurements) {\r\n this.aiDataContract = {\r\n ver: 1 /* Required */,\r\n message: 1 /* Required */,\r\n severityLevel: 0 /* Default */,\r\n properties: 0 /* Default */\r\n };\r\n var _self = this;\r\n _self.ver = 2;\r\n message = message || strNotSpecified;\r\n _self.message = dataSanitizeMessage(logger, message);\r\n _self.properties = dataSanitizeProperties(logger, properties);\r\n _self.measurements = dataSanitizeMeasurements(logger, measurements);\r\n if (severityLevel) {\r\n _self.severityLevel = severityLevel;\r\n }\r\n }\r\n Trace.envelopeType = \"Microsoft.ApplicationInsights.{0}.Message\";\r\n Trace.dataType = \"MessageData\";\r\n return Trace;\r\n}());\r\nexport { Trace };\r\n//# sourceMappingURL=Trace.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;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"}
|
package/dist-esm/Util.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 2.8.0-
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 2.8.0-nightly.2204-04
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -8,21 +8,18 @@ export { Util, CorrelationIdHelper, DateTimeUtils, dateTimeUtilsNow, dateTimeUti
|
|
|
8
8
|
export { parseConnectionString, ConnectionStringParser } from "./ConnectionStringParser";
|
|
9
9
|
export { RequestHeaders } from "./RequestResponseHeaders";
|
|
10
10
|
export { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, strNotSpecified } from "./Constants";
|
|
11
|
-
export { Data as AIData } from "./Interfaces/Contracts/Generated/Data";
|
|
12
|
-
export { Base as AIBase } from "./Interfaces/Contracts/Generated/Base";
|
|
13
11
|
export { Envelope } from "./Telemetry/Common/Envelope";
|
|
14
12
|
export { Event } from "./Telemetry/Event";
|
|
15
13
|
export { Exception } from "./Telemetry/Exception";
|
|
16
14
|
export { Metric } from "./Telemetry/Metric";
|
|
17
15
|
export { PageView } from "./Telemetry/PageView";
|
|
18
|
-
export { PageViewData } from "./Interfaces/Contracts/Generated/PageViewData";
|
|
19
16
|
export { RemoteDependencyData } from "./Telemetry/RemoteDependencyData";
|
|
20
17
|
export { Trace } from "./Telemetry/Trace";
|
|
21
18
|
export { PageViewPerformance } from "./Telemetry/PageViewPerformance";
|
|
22
19
|
export { Data } from "./Telemetry/Common/Data";
|
|
23
|
-
export { SeverityLevel } from "./Interfaces/Contracts/
|
|
20
|
+
export { SeverityLevel } from "./Interfaces/Contracts/SeverityLevel";
|
|
24
21
|
export { ConfigurationManager } from "./Interfaces/IConfig";
|
|
25
|
-
export { ContextTagKeys } from "./Interfaces/Contracts/
|
|
22
|
+
export { ContextTagKeys } from "./Interfaces/Contracts/ContextTagKeys";
|
|
26
23
|
export { DataSanitizer, dataSanitizeKeyAndAddUniqueness, dataSanitizeKey, dataSanitizeString, dataSanitizeUrl, dataSanitizeMessage, dataSanitizeException, dataSanitizeProperties, dataSanitizeMeasurements, dataSanitizeId, dataSanitizeInput, dsPadNumber } from "./Telemetry/Common/DataSanitizer";
|
|
27
24
|
export { TelemetryItemCreator } from "./TelemetryItemCreator";
|
|
28
25
|
export { CtxTagKeys, Extensions } from "./Interfaces/PartAExtensions";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicationinsights-common.js.map","sources":["applicationinsights-common.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the\r\nexport { Util, CorrelationIdHelper, DateTimeUtils, dateTimeUtilsNow, dateTimeUtilsDuration, UrlHelper, isInternalApplicationInsightsEndpoint } from \"./Util\";\r\nexport { parseConnectionString, ConnectionStringParser } from \"./ConnectionStringParser\";\r\nexport { RequestHeaders } from \"./RequestResponseHeaders\";\r\nexport { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, strNotSpecified } from \"./Constants\";\r\nexport {
|
|
1
|
+
{"version":3,"file":"applicationinsights-common.js.map","sources":["applicationinsights-common.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the\r\nexport { Util, CorrelationIdHelper, DateTimeUtils, dateTimeUtilsNow, dateTimeUtilsDuration, UrlHelper, isInternalApplicationInsightsEndpoint } from \"./Util\";\r\nexport { parseConnectionString, ConnectionStringParser } from \"./ConnectionStringParser\";\r\nexport { RequestHeaders } from \"./RequestResponseHeaders\";\r\nexport { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, strNotSpecified } from \"./Constants\";\r\nexport { Envelope } from \"./Telemetry/Common/Envelope\";\r\nexport { Event } from \"./Telemetry/Event\";\r\nexport { Exception } from \"./Telemetry/Exception\";\r\nexport { Metric } from \"./Telemetry/Metric\";\r\nexport { PageView } from \"./Telemetry/PageView\";\r\nexport { RemoteDependencyData } from \"./Telemetry/RemoteDependencyData\";\r\nexport { Trace } from \"./Telemetry/Trace\";\r\nexport { PageViewPerformance } from \"./Telemetry/PageViewPerformance\";\r\nexport { Data } from \"./Telemetry/Common/Data\";\r\nexport { SeverityLevel } from \"./Interfaces/Contracts/SeverityLevel\";\r\nexport { ConfigurationManager } from \"./Interfaces/IConfig\";\r\nexport { ContextTagKeys } from \"./Interfaces/Contracts/ContextTagKeys\";\r\nexport { DataSanitizer, dataSanitizeKeyAndAddUniqueness, dataSanitizeKey, dataSanitizeString, dataSanitizeUrl, dataSanitizeMessage, dataSanitizeException, dataSanitizeProperties, dataSanitizeMeasurements, dataSanitizeId, dataSanitizeInput, dsPadNumber } from \"./Telemetry/Common/DataSanitizer\";\r\nexport { TelemetryItemCreator } from \"./TelemetryItemCreator\";\r\nexport { CtxTagKeys, Extensions } from \"./Interfaces/PartAExtensions\";\r\nexport { DistributedTracingModes } from \"./Enums\";\r\nexport { stringToBoolOrDefault, msToTimeSpan, getExtensionByName, isCrossOriginError } from \"./HelperFuncs\";\r\nexport { isBeaconsSupported as isBeaconApiSupported } from \"@microsoft/applicationinsights-core-js\";\r\nexport { createDomEvent } from \"./DomHelperFuncs\";\r\nexport { utlDisableStorage, utlEnableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage, utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage } from \"./StorageHelperFuncs\";\r\nexport { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from \"./UrlHelperFuncs\";\r\nexport var PropertiesPluginIdentifier = \"AppInsightsPropertiesPlugin\";\r\nexport var BreezeChannelIdentifier = \"AppInsightsChannelPlugin\";\r\nexport var AnalyticsPluginIdentifier = \"ApplicationInsightsAnalytics\";\r\n//# sourceMappingURL=applicationinsights-common.js.map"],"names":[],"mappings":";;;;AAA4D;AAC5D;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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-common",
|
|
3
|
-
"version": "2.8.0-
|
|
3
|
+
"version": "2.8.0-nightly.2204-04",
|
|
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",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@microsoft/applicationinsights-shims": "2.0.1",
|
|
50
|
-
"@microsoft/applicationinsights-core-js": "2.8.0-
|
|
50
|
+
"@microsoft/applicationinsights-core-js": "2.8.0-nightly.2204-04",
|
|
51
51
|
"@microsoft/dynamicproto-js": "^1.1.4"
|
|
52
52
|
},
|
|
53
53
|
"license": "MIT",
|
|
54
54
|
"publishConfig": {
|
|
55
|
-
"tag": "
|
|
55
|
+
"tag": "nightly"
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
-
import { SeverityLevel } from "./Contracts/
|
|
4
|
+
import { SeverityLevel } from "./Contracts/SeverityLevel"
|
|
5
5
|
import { IPartC } from "./IPartC";
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
-
import { SeverityLevel } from "./Contracts/
|
|
4
|
+
import { SeverityLevel } from "./Contracts/SeverityLevel"
|
|
5
5
|
import { IPartC } from "./IPartC";
|
|
6
6
|
|
|
7
7
|
export interface ITraceTelemetry extends IPartC {
|
|
@@ -4,12 +4,44 @@
|
|
|
4
4
|
import { ISerializable } from "./ISerializable";
|
|
5
5
|
|
|
6
6
|
export interface IEnvelope extends ISerializable {
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Envelope version. For internal use only. By assigning this the default, it will not be serialized within the payload unless changed to a value other than #1.
|
|
10
|
+
*/
|
|
11
|
+
ver: number; /* 1 */
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Type name of telemetry data item.
|
|
15
|
+
*/
|
|
8
16
|
name: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Event date time when telemetry item was created. This is the wall clock time on the client when the event was generated. There is no guarantee that the client's time is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z' character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the number of decimal seconds digits provided are variable (and unspecified). Consumers should handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies a fixed length. Example: 2009-06-15T13:45:30.0000000Z.
|
|
20
|
+
*/
|
|
9
21
|
time: string;
|
|
10
|
-
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.
|
|
25
|
+
*/
|
|
26
|
+
sampleRate: number; /* 100.0 */
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Sequence field used to track absolute order of uploaded events.
|
|
30
|
+
*/
|
|
11
31
|
seq: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The application's instrumentation key. The key is typically represented as a GUID, but there are cases when it is not a guid. No code should rely on iKey being a GUID. Instrumentation key is case insensitive.
|
|
35
|
+
*/
|
|
12
36
|
iKey: string;
|
|
13
|
-
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Key/value collection of context properties. See ContextTagKeys for information on available properties.
|
|
40
|
+
*/
|
|
41
|
+
tags: { [name: string]: any }; /* {} */
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Telemetry data item.
|
|
45
|
+
*/
|
|
14
46
|
data: any;
|
|
15
47
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { IData } from "../../Interfaces/Contracts/IData";
|
|
5
5
|
import { ISerializable } from "../../Interfaces/Telemetry/ISerializable";
|
|
6
6
|
import { FieldType } from "../../Enums";
|
|
7
7
|
|
|
8
|
-
export class Data<TDomain>
|
|
8
|
+
export class Data<TDomain> implements IData<TDomain>, ISerializable {
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* The data contract for serializing this object.
|
|
@@ -15,12 +15,20 @@ export class Data<TDomain> extends AIData<TDomain> implements ISerializable {
|
|
|
15
15
|
baseData: FieldType.Required
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Name of item (B section) if any. If telemetry data is derived straight from this, this should be null.
|
|
20
|
+
*/
|
|
21
|
+
public baseType: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Container for data item (B section).
|
|
25
|
+
*/
|
|
26
|
+
public baseData: TDomain;
|
|
27
|
+
|
|
18
28
|
/**
|
|
19
29
|
* Constructs a new instance of telemetry data.
|
|
20
30
|
*/
|
|
21
31
|
constructor(baseType: string, data: TDomain) {
|
|
22
|
-
super();
|
|
23
|
-
|
|
24
32
|
this.baseType = baseType;
|
|
25
33
|
this.baseData = data;
|
|
26
34
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { IDataPoint } from "../../Interfaces/Contracts/IDataPoint";
|
|
5
5
|
import { ISerializable } from "../../Interfaces/Telemetry/ISerializable";
|
|
6
6
|
import { FieldType } from "../../Enums";
|
|
7
|
+
import { DataPointType } from "../../Interfaces/Contracts/DataPointType";
|
|
7
8
|
|
|
8
|
-
export class DataPoint
|
|
9
|
+
export class DataPoint implements IDataPoint, ISerializable {
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* The data contract for serializing this object.
|
|
@@ -19,4 +20,39 @@ export class DataPoint extends AIDataPoint implements ISerializable {
|
|
|
19
20
|
max: FieldType.Default,
|
|
20
21
|
stdDev: FieldType.Default
|
|
21
22
|
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Name of the metric.
|
|
26
|
+
*/
|
|
27
|
+
public name: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Metric type. Single measurement or the aggregated value.
|
|
31
|
+
*/
|
|
32
|
+
public kind: DataPointType = DataPointType.Measurement;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Single value for measurement. Sum of individual measurements for the aggregation.
|
|
36
|
+
*/
|
|
37
|
+
public value: number;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Metric weight of the aggregated metric. Should not be set for a measurement.
|
|
41
|
+
*/
|
|
42
|
+
public count: number;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Minimum value of the aggregated metric. Should not be set for a measurement.
|
|
46
|
+
*/
|
|
47
|
+
public min: number;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Maximum value of the aggregated metric. Should not be set for a measurement.
|
|
51
|
+
*/
|
|
52
|
+
public max: number;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Standard deviation of the aggregated metric. Should not be set for a measurement.
|
|
56
|
+
*/
|
|
57
|
+
public stdDev: number;
|
|
22
58
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import { Base } from "../../Interfaces/Contracts/Generated/Base";
|
|
4
|
+
import { IBase } from "../../Interfaces/Contracts/IBase";
|
|
6
5
|
import { IEnvelope } from "../../Interfaces/Telemetry/IEnvelope";
|
|
7
6
|
import { dataSanitizeString } from "./DataSanitizer";
|
|
8
7
|
import { FieldType } from "../../Enums";
|
|
9
8
|
import { IDiagnosticLogger, toISOString } from "@microsoft/applicationinsights-core-js";
|
|
10
9
|
import { strNotSpecified } from "../../Constants";
|
|
11
10
|
|
|
12
|
-
export class Envelope
|
|
11
|
+
export class Envelope implements IEnvelope {
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* The data contract for serializing this object.
|
|
@@ -17,16 +16,58 @@ export class Envelope extends AIEnvelope implements IEnvelope {
|
|
|
17
16
|
public aiDataContract: any;
|
|
18
17
|
|
|
19
18
|
/**
|
|
20
|
-
*
|
|
19
|
+
* Envelope version. For internal use only. By assigning this the default, it will not be serialized within the payload unless changed to a value other than #1.
|
|
21
20
|
*/
|
|
22
|
-
|
|
23
|
-
super();
|
|
21
|
+
public ver: number; /* 1 */
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Type name of telemetry data item.
|
|
25
|
+
*/
|
|
26
|
+
public name: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Event date time when telemetry item was created. This is the wall clock time on the client when the event was generated. There is no guarantee that the client's time is accurate. This field must be formatted in UTC ISO 8601 format, with a trailing 'Z' character, as described publicly on https://en.wikipedia.org/wiki/ISO_8601#UTC. Note: the number of decimal seconds digits provided are variable (and unspecified). Consumers should handle this, i.e. managed code consumers should not use format 'O' for parsing as it specifies a fixed length. Example: 2009-06-15T13:45:30.0000000Z.
|
|
30
|
+
*/
|
|
31
|
+
public time: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.
|
|
35
|
+
*/
|
|
36
|
+
public sampleRate: number; /* 100.0 */
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Sequence field used to track absolute order of uploaded events.
|
|
40
|
+
*/
|
|
41
|
+
public seq: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The application's instrumentation key. The key is typically represented as a GUID, but there are cases when it is not a guid. No code should rely on iKey being a GUID. Instrumentation key is case insensitive.
|
|
45
|
+
*/
|
|
46
|
+
public iKey: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Key/value collection of context properties. See ContextTagKeys for information on available properties.
|
|
50
|
+
*/
|
|
51
|
+
public tags: any; /* {} */
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Telemetry data item.
|
|
55
|
+
*/
|
|
56
|
+
public data: IBase;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Constructs a new instance of telemetry data.
|
|
60
|
+
*/
|
|
61
|
+
constructor(logger: IDiagnosticLogger, data: IBase, name: string) {
|
|
62
|
+
let _self = this;
|
|
63
|
+
_self.ver = 1;
|
|
64
|
+
_self.sampleRate = 100.0;
|
|
65
|
+
_self.tags = {};
|
|
66
|
+
_self.name = dataSanitizeString(logger, name) || strNotSpecified;
|
|
67
|
+
_self.data = data;
|
|
68
|
+
_self.time = toISOString(new Date());
|
|
28
69
|
|
|
29
|
-
|
|
70
|
+
_self.aiDataContract = {
|
|
30
71
|
time: FieldType.Required,
|
|
31
72
|
iKey: FieldType.Required,
|
|
32
73
|
name: FieldType.Required,
|