@microsoft/applicationinsights-common 3.0.2-nightly3.2305-11 → 3.0.2
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/README.md +4 -3
- package/browser/es5/applicationinsights-common.cjs.js +12 -13
- package/browser/es5/applicationinsights-common.cjs.js.map +1 -1
- package/browser/es5/applicationinsights-common.cjs.min.js +2 -2
- package/browser/es5/applicationinsights-common.cjs.min.js.map +1 -1
- package/browser/es5/applicationinsights-common.gbl.js +14 -15
- package/browser/es5/applicationinsights-common.gbl.js.map +1 -1
- package/browser/es5/applicationinsights-common.gbl.min.js +2 -2
- package/browser/es5/applicationinsights-common.gbl.min.js.map +1 -1
- package/browser/es5/applicationinsights-common.integrity.json +25 -25
- package/browser/es5/applicationinsights-common.js +14 -15
- package/browser/es5/applicationinsights-common.js.map +1 -1
- package/browser/es5/applicationinsights-common.min.js +2 -2
- package/browser/es5/applicationinsights-common.min.js.map +1 -1
- package/dist/es5/applicationinsights-common.js +12 -13
- package/dist/es5/applicationinsights-common.js.map +1 -1
- package/dist/es5/applicationinsights-common.min.js +2 -2
- package/dist/es5/applicationinsights-common.min.js.map +1 -1
- package/dist-es5/ConnectionStringParser.js +1 -1
- package/dist-es5/Constants.js +1 -1
- package/dist-es5/DomHelperFuncs.js +1 -1
- package/dist-es5/Enums.js +1 -1
- package/dist-es5/HelperFuncs.js +1 -1
- package/dist-es5/Interfaces/ConnectionString.js +1 -1
- package/dist-es5/Interfaces/Context/IApplication.js +1 -1
- package/dist-es5/Interfaces/Context/IDevice.js +1 -1
- package/dist-es5/Interfaces/Context/IInternal.js +1 -1
- package/dist-es5/Interfaces/Context/ILocation.js +1 -1
- package/dist-es5/Interfaces/Context/IOperatingSystem.js +1 -1
- package/dist-es5/Interfaces/Context/ISample.js +1 -1
- package/dist-es5/Interfaces/Context/ISession.js +1 -1
- package/dist-es5/Interfaces/Context/ITelemetryTrace.js +1 -1
- package/dist-es5/Interfaces/Context/IUser.js +1 -1
- package/dist-es5/Interfaces/Context/IWeb.js +1 -1
- package/dist-es5/Interfaces/Contracts/AvailabilityData.js +1 -1
- package/dist-es5/Interfaces/Contracts/ContextTagKeys.js +1 -1
- package/dist-es5/Interfaces/Contracts/DataPointType.js +1 -1
- package/dist-es5/Interfaces/Contracts/DependencyKind.js +1 -1
- package/dist-es5/Interfaces/Contracts/DependencySourceType.js +1 -1
- package/dist-es5/Interfaces/Contracts/IBase.js +1 -1
- package/dist-es5/Interfaces/Contracts/IData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IDataPoint.js +1 -1
- package/dist-es5/Interfaces/Contracts/IDomain.js +1 -1
- package/dist-es5/Interfaces/Contracts/IEnvelope.js +1 -1
- package/dist-es5/Interfaces/Contracts/IEventData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IExceptionData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IExceptionDetails.js +1 -1
- package/dist-es5/Interfaces/Contracts/IMessageData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IMetricData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IPageViewData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IPageViewPerfData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
- package/dist-es5/Interfaces/Contracts/IStackFrame.js +1 -1
- package/dist-es5/Interfaces/Contracts/RequestData.js +1 -1
- package/dist-es5/Interfaces/Contracts/SeverityLevel.js +1 -1
- package/dist-es5/Interfaces/IAppInsights.js +1 -1
- package/dist-es5/Interfaces/IConfig.js +1 -1
- package/dist-es5/Interfaces/ICorrelationConfig.js +1 -1
- package/dist-es5/Interfaces/IDependencyTelemetry.js +1 -1
- package/dist-es5/Interfaces/IEventTelemetry.js +1 -1
- package/dist-es5/Interfaces/IExceptionTelemetry.js +1 -1
- package/dist-es5/Interfaces/IMetricTelemetry.js +1 -1
- package/dist-es5/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
- package/dist-es5/Interfaces/IPageViewTelemetry.js +1 -1
- package/dist-es5/Interfaces/IPartC.js +1 -1
- package/dist-es5/Interfaces/IPropertiesPlugin.js +1 -1
- package/dist-es5/Interfaces/IRequestContext.js +1 -1
- package/dist-es5/Interfaces/IStorageBuffer.js +1 -1
- package/dist-es5/Interfaces/ITelemetryContext.js +1 -1
- package/dist-es5/Interfaces/IThrottleMgr.js +1 -1
- package/dist-es5/Interfaces/ITraceTelemetry.js +1 -1
- package/dist-es5/Interfaces/PartAExtensions.js +1 -1
- package/dist-es5/Interfaces/Telemetry/IEnvelope.js +1 -1
- package/dist-es5/Interfaces/Telemetry/ISerializable.js +1 -1
- package/dist-es5/RequestResponseHeaders.js +1 -1
- package/dist-es5/StorageHelperFuncs.js +1 -1
- package/dist-es5/Telemetry/Common/Data.js +1 -1
- package/dist-es5/Telemetry/Common/DataPoint.js +1 -1
- package/dist-es5/Telemetry/Common/DataSanitizer.js +12 -12
- package/dist-es5/Telemetry/Common/DataSanitizer.js.map +1 -1
- package/dist-es5/Telemetry/Common/Envelope.js +1 -1
- package/dist-es5/Telemetry/Event.js +1 -1
- package/dist-es5/Telemetry/Exception.js +1 -1
- package/dist-es5/Telemetry/Metric.js +1 -1
- package/dist-es5/Telemetry/PageView.js +1 -1
- package/dist-es5/Telemetry/PageViewPerformance.js +1 -1
- package/dist-es5/Telemetry/RemoteDependencyData.js +1 -1
- package/dist-es5/Telemetry/Trace.js +1 -1
- package/dist-es5/TelemetryItemCreator.js +1 -1
- package/dist-es5/ThrottleMgr.js +2 -2
- package/dist-es5/ThrottleMgr.js.map +1 -1
- package/dist-es5/UrlHelperFuncs.js +1 -1
- package/dist-es5/Util.js +1 -1
- package/dist-es5/__DynamicConstants.js +2 -3
- package/dist-es5/__DynamicConstants.js.map +1 -1
- package/dist-es5/applicationinsights-common.js +1 -1
- package/package.json +60 -63
- package/types/applicationinsights-common.d.ts +1 -1
- package/types/applicationinsights-common.namespaced.d.ts +1 -1
package/README.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
# Microsoft Application Insights JavaScript SDK - Common
|
|
2
2
|
|
|
3
|
-
[](https://github.com/microsoft/ApplicationInsights-JS/tree/main)
|
|
4
|
+
[?branchName=main)](https://dev.azure.com/mseng/AppInsights/_build/latest?definitionId=8184&branchName=main)
|
|
4
5
|
[](https://badge.fury.io/js/%40microsoft%2Fapplicationinsights-common)
|
|
5
6
|
|
|
6
7
|
Common library for the Application Insights Javascript SDK
|
|
7
8
|
|
|
8
|
-
##
|
|
9
|
+
## V3.x Release Breaking changes
|
|
9
10
|
|
|
10
11
|
- Removed ES3 / IE8 Support
|
|
11
12
|
- Removed V1 API Backward Compatibility (Upgrading V1 -> V3)
|
|
12
13
|
|
|
13
|
-
See [Breaking Changes](
|
|
14
|
+
See [Breaking Changes](https://microsoft.github.io/ApplicationInsights-JS/upgrade/v3_BreakingChanges.html)
|
|
14
15
|
|
|
15
16
|
## Build:
|
|
16
17
|
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 3.0.2
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 3.0.2
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -1252,7 +1252,7 @@ function newId(maxLength) {
|
|
|
1252
1252
|
return result;
|
|
1253
1253
|
}
|
|
1254
1254
|
|
|
1255
|
-
var version =
|
|
1255
|
+
var version = '3.0.2';
|
|
1256
1256
|
var instanceName = "." + newId(6);
|
|
1257
1257
|
var _dataUid = 0;
|
|
1258
1258
|
function createUniqueNamespace(name, includeVersion) {
|
|
@@ -2280,7 +2280,6 @@ var _DYN_FILE_NAME = "fileName";
|
|
|
2280
2280
|
var _DYN_LINE = "line";
|
|
2281
2281
|
var _DYN_DURATION = "duration";
|
|
2282
2282
|
var _DYN_RECEIVED_RESPONSE = "receivedResponse";
|
|
2283
|
-
var _DYN_SUBSTRING = "substring";
|
|
2284
2283
|
|
|
2285
2284
|
function dataSanitizeKeyAndAddUniqueness(logger, key, map) {
|
|
2286
2285
|
var origLength = key[_DYN_LENGTH ];
|
|
@@ -2290,7 +2289,7 @@ function dataSanitizeKeyAndAddUniqueness(logger, key, map) {
|
|
|
2290
2289
|
var uniqueField = field;
|
|
2291
2290
|
while (map[uniqueField] !== undefined) {
|
|
2292
2291
|
i++;
|
|
2293
|
-
uniqueField = field
|
|
2292
|
+
uniqueField = strSubstring(field, 0, 150 - 3) + dsPadNumber(i);
|
|
2294
2293
|
}
|
|
2295
2294
|
field = uniqueField;
|
|
2296
2295
|
}
|
|
@@ -2299,9 +2298,9 @@ function dataSanitizeKeyAndAddUniqueness(logger, key, map) {
|
|
|
2299
2298
|
function dataSanitizeKey(logger, name) {
|
|
2300
2299
|
var nameTrunc;
|
|
2301
2300
|
if (name) {
|
|
2302
|
-
name = strTrim(name
|
|
2301
|
+
name = strTrim(asString(name));
|
|
2303
2302
|
if (name[_DYN_LENGTH ] > 150 ) {
|
|
2304
|
-
nameTrunc = name
|
|
2303
|
+
nameTrunc = strSubstring(name, 0, 150 );
|
|
2305
2304
|
_throwInternal(logger, 2 , 57 , "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
|
|
2306
2305
|
}
|
|
2307
2306
|
}
|
|
@@ -2312,9 +2311,9 @@ function dataSanitizeString(logger, value, maxLength) {
|
|
|
2312
2311
|
var valueTrunc;
|
|
2313
2312
|
if (value) {
|
|
2314
2313
|
maxLength = maxLength ? maxLength : 1024 ;
|
|
2315
|
-
value = strTrim(value
|
|
2314
|
+
value = strTrim(asString(value));
|
|
2316
2315
|
if (value[_DYN_LENGTH ] > maxLength) {
|
|
2317
|
-
valueTrunc = value
|
|
2316
|
+
valueTrunc = strSubstring(value, 0, maxLength);
|
|
2318
2317
|
_throwInternal(logger, 2 , 61 , "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
|
|
2319
2318
|
}
|
|
2320
2319
|
}
|
|
@@ -2327,7 +2326,7 @@ function dataSanitizeMessage(logger, message) {
|
|
|
2327
2326
|
var messageTrunc;
|
|
2328
2327
|
if (message) {
|
|
2329
2328
|
if (message[_DYN_LENGTH ] > 32768 ) {
|
|
2330
|
-
messageTrunc = message
|
|
2329
|
+
messageTrunc = strSubstring(message, 0, 32768 );
|
|
2331
2330
|
_throwInternal(logger, 2 , 56 , "message is too long, it has been truncated to " + 32768 + " characters.", { message: message }, true);
|
|
2332
2331
|
}
|
|
2333
2332
|
}
|
|
@@ -2338,7 +2337,7 @@ function dataSanitizeException(logger, exception) {
|
|
|
2338
2337
|
if (exception) {
|
|
2339
2338
|
var value = "" + exception;
|
|
2340
2339
|
if (value[_DYN_LENGTH ] > 32768 ) {
|
|
2341
|
-
exceptionTrunc = value
|
|
2340
|
+
exceptionTrunc = strSubstring(value, 0, 32768 );
|
|
2342
2341
|
_throwInternal(logger, 2 , 52 , "exception is too long, it has been truncated to " + 32768 + " characters.", { exception: exception }, true);
|
|
2343
2342
|
}
|
|
2344
2343
|
}
|
|
@@ -2381,9 +2380,9 @@ function dataSanitizeId(logger, id) {
|
|
|
2381
2380
|
function dataSanitizeInput(logger, input, maxLength, _msgId) {
|
|
2382
2381
|
var inputTrunc;
|
|
2383
2382
|
if (input) {
|
|
2384
|
-
input = strTrim(input
|
|
2383
|
+
input = strTrim(asString(input));
|
|
2385
2384
|
if (input[_DYN_LENGTH ] > maxLength) {
|
|
2386
|
-
inputTrunc = input
|
|
2385
|
+
inputTrunc = strSubstring(input, 0, maxLength);
|
|
2387
2386
|
_throwInternal(logger, 2 , _msgId, "input is too long, it has been truncated to " + maxLength + " characters.", { data: input }, true);
|
|
2388
2387
|
}
|
|
2389
2388
|
}
|
|
@@ -2885,7 +2884,7 @@ var ThrottleMgr = /** @class */ (function () {
|
|
|
2885
2884
|
_namePrefix = isNotNullOrUndefined(namePrefix) ? namePrefix : "";
|
|
2886
2885
|
unloadHookContainer = unloadHookContainer || createUnloadHookContainer();
|
|
2887
2886
|
config = createDynamicConfig(config || {}, null, _logger).cfg;
|
|
2888
|
-
var unloadHook = onConfigChange(
|
|
2887
|
+
var unloadHook = onConfigChange(config, function () {
|
|
2889
2888
|
var _a, _b;
|
|
2890
2889
|
_canUseLocalStorage = utlCanUseLocalStorage();
|
|
2891
2890
|
var configMgr = config || {};
|