@microsoft/applicationinsights-channel-js 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-channel-js.integrity.json +9 -9
- package/browser/applicationinsights-channel-js.js +158 -293
- package/browser/applicationinsights-channel-js.js.map +1 -1
- package/browser/applicationinsights-channel-js.min.js +2 -2
- package/browser/applicationinsights-channel-js.min.js.map +1 -1
- package/dist/applicationinsights-channel-js.api.json +56 -29
- package/dist/applicationinsights-channel-js.d.ts +1 -1
- package/dist/applicationinsights-channel-js.js +158 -293
- package/dist/applicationinsights-channel-js.js.map +1 -1
- package/dist/applicationinsights-channel-js.min.js +2 -2
- package/dist/applicationinsights-channel-js.min.js.map +1 -1
- package/dist/applicationinsights-channel-js.rollup.d.ts +1 -1
- package/dist-esm/EnvelopeCreator.js +2 -2
- package/dist-esm/EnvelopeCreator.js.map +1 -1
- package/dist-esm/Interfaces.js +1 -1
- package/dist-esm/Offline.js +1 -1
- package/dist-esm/SendBuffer.js +1 -1
- package/dist-esm/Sender.js +1 -1
- package/dist-esm/Serializer.js +1 -1
- package/dist-esm/TelemetryProcessors/Sample.js +1 -1
- package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +1 -1
- package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +1 -1
- package/dist-esm/applicationinsights-channel-js.js +1 -1
- package/package.json +4 -4
- package/src/EnvelopeCreator.ts +1 -1
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Channel, 2.8.0-
|
|
2
|
+
* Application Insights JavaScript SDK - Channel, 2.8.0-nightly.2204-04
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -1255,7 +1255,7 @@
|
|
|
1255
1255
|
}
|
|
1256
1256
|
|
|
1257
1257
|
var _objDefineProperty = ObjDefineProperty;
|
|
1258
|
-
var version = "2.8.0-
|
|
1258
|
+
var version = "2.8.0-nightly.2204-04";
|
|
1259
1259
|
var instanceName = "." + newId(6);
|
|
1260
1260
|
var _dataUid = 0;
|
|
1261
1261
|
function _createAccessor(target, prop, value) {
|
|
@@ -2415,37 +2415,17 @@
|
|
|
2415
2415
|
};
|
|
2416
2416
|
}
|
|
2417
2417
|
|
|
2418
|
-
var
|
|
2419
|
-
function Base() {
|
|
2420
|
-
}
|
|
2421
|
-
return Base;
|
|
2422
|
-
}());
|
|
2423
|
-
|
|
2424
|
-
var Data$1 = /** @class */ (function (_super) {
|
|
2425
|
-
__extendsFn(Data, _super);
|
|
2426
|
-
function Data() {
|
|
2427
|
-
return _super.call(this) || this;
|
|
2428
|
-
}
|
|
2429
|
-
return Data;
|
|
2430
|
-
}(Base));
|
|
2431
|
-
|
|
2432
|
-
var Envelope$1 = /** @class */ (function () {
|
|
2433
|
-
function Envelope() {
|
|
2434
|
-
this.ver = 1;
|
|
2435
|
-
this.sampleRate = 100.0;
|
|
2436
|
-
this.tags = {};
|
|
2437
|
-
}
|
|
2438
|
-
return Envelope;
|
|
2439
|
-
}());
|
|
2440
|
-
|
|
2441
|
-
var Envelope = /** @class */ (function (_super) {
|
|
2442
|
-
__extendsFn(Envelope, _super);
|
|
2418
|
+
var Envelope = /** @class */ (function () {
|
|
2443
2419
|
function Envelope(logger, data, name) {
|
|
2444
|
-
var _this =
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2420
|
+
var _this = this;
|
|
2421
|
+
var _self = this;
|
|
2422
|
+
_self.ver = 1;
|
|
2423
|
+
_self.sampleRate = 100.0;
|
|
2424
|
+
_self.tags = {};
|
|
2425
|
+
_self.name = dataSanitizeString(logger, name) || strNotSpecified;
|
|
2426
|
+
_self.data = data;
|
|
2427
|
+
_self.time = toISOString(new Date());
|
|
2428
|
+
_self.aiDataContract = {
|
|
2449
2429
|
time: 1 ,
|
|
2450
2430
|
iKey: 1 ,
|
|
2451
2431
|
name: 1 ,
|
|
@@ -2455,62 +2435,27 @@
|
|
|
2455
2435
|
tags: 1 ,
|
|
2456
2436
|
data: 1
|
|
2457
2437
|
};
|
|
2458
|
-
return _this;
|
|
2459
2438
|
}
|
|
2460
2439
|
return Envelope;
|
|
2461
|
-
}(Envelope$1));
|
|
2462
|
-
|
|
2463
|
-
var EventData = /** @class */ (function () {
|
|
2464
|
-
function EventData() {
|
|
2465
|
-
this.ver = 2;
|
|
2466
|
-
this.properties = {};
|
|
2467
|
-
this.measurements = {};
|
|
2468
|
-
}
|
|
2469
|
-
return EventData;
|
|
2470
2440
|
}());
|
|
2471
2441
|
|
|
2472
|
-
var Event = /** @class */ (function (
|
|
2473
|
-
__extendsFn(Event, _super);
|
|
2442
|
+
var Event = /** @class */ (function () {
|
|
2474
2443
|
function Event(logger, name, properties, measurements) {
|
|
2475
|
-
|
|
2476
|
-
_this.aiDataContract = {
|
|
2444
|
+
this.aiDataContract = {
|
|
2477
2445
|
ver: 1 ,
|
|
2478
2446
|
name: 1 ,
|
|
2479
2447
|
properties: 0 ,
|
|
2480
2448
|
measurements: 0
|
|
2481
2449
|
};
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2450
|
+
var _self = this;
|
|
2451
|
+
_self.ver = 2;
|
|
2452
|
+
_self.name = dataSanitizeString(logger, name) || strNotSpecified;
|
|
2453
|
+
_self.properties = dataSanitizeProperties(logger, properties);
|
|
2454
|
+
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
2486
2455
|
}
|
|
2487
2456
|
Event.envelopeType = "Microsoft.ApplicationInsights.{0}.Event";
|
|
2488
2457
|
Event.dataType = "EventData";
|
|
2489
2458
|
return Event;
|
|
2490
|
-
}(EventData));
|
|
2491
|
-
|
|
2492
|
-
var StackFrame = /** @class */ (function () {
|
|
2493
|
-
function StackFrame() {
|
|
2494
|
-
}
|
|
2495
|
-
return StackFrame;
|
|
2496
|
-
}());
|
|
2497
|
-
|
|
2498
|
-
var ExceptionData = /** @class */ (function () {
|
|
2499
|
-
function ExceptionData() {
|
|
2500
|
-
this.ver = 2;
|
|
2501
|
-
this.exceptions = [];
|
|
2502
|
-
this.properties = {};
|
|
2503
|
-
this.measurements = {};
|
|
2504
|
-
}
|
|
2505
|
-
return ExceptionData;
|
|
2506
|
-
}());
|
|
2507
|
-
|
|
2508
|
-
var ExceptionDetails = /** @class */ (function () {
|
|
2509
|
-
function ExceptionDetails() {
|
|
2510
|
-
this.hasFullStack = true;
|
|
2511
|
-
this.parsedStack = [];
|
|
2512
|
-
}
|
|
2513
|
-
return ExceptionDetails;
|
|
2514
2459
|
}());
|
|
2515
2460
|
|
|
2516
2461
|
var NoMethod = "<no_method>";
|
|
@@ -2754,50 +2699,48 @@
|
|
|
2754
2699
|
}
|
|
2755
2700
|
return "" + (errorObj || "");
|
|
2756
2701
|
}
|
|
2757
|
-
var Exception = /** @class */ (function (
|
|
2758
|
-
__extendsFn(Exception, _super);
|
|
2702
|
+
var Exception = /** @class */ (function () {
|
|
2759
2703
|
function Exception(logger, exception, properties, measurements, severityLevel, id) {
|
|
2760
|
-
|
|
2761
|
-
_this.aiDataContract = {
|
|
2704
|
+
this.aiDataContract = {
|
|
2762
2705
|
ver: 1 ,
|
|
2763
2706
|
exceptions: 1 ,
|
|
2764
2707
|
severityLevel: 0 ,
|
|
2765
2708
|
properties: 0 ,
|
|
2766
2709
|
measurements: 0
|
|
2767
2710
|
};
|
|
2711
|
+
var _self = this;
|
|
2712
|
+
_self.ver = 2;
|
|
2768
2713
|
if (!_isExceptionInternal(exception)) {
|
|
2769
2714
|
if (!properties) {
|
|
2770
2715
|
properties = {};
|
|
2771
2716
|
}
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2717
|
+
_self.exceptions = [new _ExceptionDetails(logger, exception, properties)];
|
|
2718
|
+
_self.properties = dataSanitizeProperties(logger, properties);
|
|
2719
|
+
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
2775
2720
|
if (severityLevel) {
|
|
2776
|
-
|
|
2721
|
+
_self.severityLevel = severityLevel;
|
|
2777
2722
|
}
|
|
2778
2723
|
if (id) {
|
|
2779
|
-
|
|
2724
|
+
_self.id = id;
|
|
2780
2725
|
}
|
|
2781
2726
|
}
|
|
2782
2727
|
else {
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2728
|
+
_self.exceptions = exception.exceptions || [];
|
|
2729
|
+
_self.properties = exception.properties;
|
|
2730
|
+
_self.measurements = exception.measurements;
|
|
2786
2731
|
if (exception.severityLevel) {
|
|
2787
|
-
|
|
2732
|
+
_self.severityLevel = exception.severityLevel;
|
|
2788
2733
|
}
|
|
2789
2734
|
if (exception.id) {
|
|
2790
|
-
|
|
2735
|
+
_self.id = exception.id;
|
|
2791
2736
|
}
|
|
2792
2737
|
if (exception.problemGroup) {
|
|
2793
|
-
|
|
2738
|
+
_self.problemGroup = exception.problemGroup;
|
|
2794
2739
|
}
|
|
2795
|
-
_this.ver = 2;
|
|
2796
2740
|
if (!isNullOrUndefined(exception.isManual)) {
|
|
2797
|
-
|
|
2741
|
+
_self.isManual = exception.isManual;
|
|
2798
2742
|
}
|
|
2799
2743
|
}
|
|
2800
|
-
return _this;
|
|
2801
2744
|
}
|
|
2802
2745
|
Exception.CreateAutoException = function (message, url, lineNumber, columnNumber, error, evt, stack, errorSrc) {
|
|
2803
2746
|
var errorType = _getErrorType(error || evt || message);
|
|
@@ -2851,12 +2794,10 @@
|
|
|
2851
2794
|
Exception.dataType = "ExceptionData";
|
|
2852
2795
|
Exception.formatError = _formatErrorCode;
|
|
2853
2796
|
return Exception;
|
|
2854
|
-
}(
|
|
2855
|
-
var _ExceptionDetails = /** @class */ (function (
|
|
2856
|
-
__extendsFn(_ExceptionDetails, _super);
|
|
2797
|
+
}());
|
|
2798
|
+
var _ExceptionDetails = /** @class */ (function () {
|
|
2857
2799
|
function _ExceptionDetails(logger, exception, properties) {
|
|
2858
|
-
|
|
2859
|
-
_this.aiDataContract = {
|
|
2800
|
+
this.aiDataContract = {
|
|
2860
2801
|
id: 0 ,
|
|
2861
2802
|
outerId: 0 ,
|
|
2862
2803
|
typeName: 1 ,
|
|
@@ -2865,41 +2806,42 @@
|
|
|
2865
2806
|
stack: 0 ,
|
|
2866
2807
|
parsedStack: 2
|
|
2867
2808
|
};
|
|
2809
|
+
var _self = this;
|
|
2868
2810
|
if (!_isExceptionDetailsInternal(exception)) {
|
|
2869
2811
|
var error = exception;
|
|
2870
2812
|
var evt = error && error.evt;
|
|
2871
2813
|
if (!isError(error)) {
|
|
2872
2814
|
error = error[strError] || evt || error;
|
|
2873
2815
|
}
|
|
2874
|
-
|
|
2875
|
-
|
|
2816
|
+
_self.typeName = dataSanitizeString(logger, _getErrorType(error)) || strNotSpecified;
|
|
2817
|
+
_self.message = dataSanitizeMessage(logger, _formatMessage(exception || error, _self.typeName)) || strNotSpecified;
|
|
2876
2818
|
var stack = exception[strStackDetails] || _getStackFromErrorObj(exception);
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2819
|
+
_self.parsedStack = _parseStack(stack);
|
|
2820
|
+
_self[strStack] = dataSanitizeException(logger, _formatStackTrace(stack));
|
|
2821
|
+
_self.hasFullStack = isArray(_self.parsedStack) && _self.parsedStack.length > 0;
|
|
2880
2822
|
if (properties) {
|
|
2881
|
-
properties.typeName = properties.typeName ||
|
|
2823
|
+
properties.typeName = properties.typeName || _self.typeName;
|
|
2882
2824
|
}
|
|
2883
2825
|
}
|
|
2884
2826
|
else {
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2827
|
+
_self.typeName = exception.typeName;
|
|
2828
|
+
_self.message = exception.message;
|
|
2829
|
+
_self[strStack] = exception[strStack];
|
|
2830
|
+
_self.parsedStack = exception.parsedStack || [];
|
|
2831
|
+
_self.hasFullStack = exception.hasFullStack;
|
|
2890
2832
|
}
|
|
2891
|
-
return _this;
|
|
2892
2833
|
}
|
|
2893
2834
|
_ExceptionDetails.prototype.toInterface = function () {
|
|
2894
|
-
var
|
|
2895
|
-
|
|
2835
|
+
var _self = this;
|
|
2836
|
+
var parsedStack = _self.parsedStack instanceof Array
|
|
2837
|
+
&& arrMap(_self.parsedStack, function (frame) { return frame.toInterface(); });
|
|
2896
2838
|
var exceptionDetailsInterface = {
|
|
2897
|
-
id:
|
|
2898
|
-
outerId:
|
|
2899
|
-
typeName:
|
|
2900
|
-
message:
|
|
2901
|
-
hasFullStack:
|
|
2902
|
-
stack:
|
|
2839
|
+
id: _self.id,
|
|
2840
|
+
outerId: _self.outerId,
|
|
2841
|
+
typeName: _self.typeName,
|
|
2842
|
+
message: _self.message,
|
|
2843
|
+
hasFullStack: _self.hasFullStack,
|
|
2844
|
+
stack: _self[strStack],
|
|
2903
2845
|
parsedStack: parsedStack || undefined
|
|
2904
2846
|
};
|
|
2905
2847
|
return exceptionDetailsInterface;
|
|
@@ -2912,94 +2854,68 @@
|
|
|
2912
2854
|
return exceptionDetails;
|
|
2913
2855
|
};
|
|
2914
2856
|
return _ExceptionDetails;
|
|
2915
|
-
}(
|
|
2916
|
-
var _StackFrame = /** @class */ (function (
|
|
2917
|
-
__extendsFn(_StackFrame, _super);
|
|
2857
|
+
}());
|
|
2858
|
+
var _StackFrame = /** @class */ (function () {
|
|
2918
2859
|
function _StackFrame(sourceFrame, level) {
|
|
2919
|
-
|
|
2920
|
-
_this.sizeInBytes = 0;
|
|
2921
|
-
_this.aiDataContract = {
|
|
2860
|
+
this.aiDataContract = {
|
|
2922
2861
|
level: 1 ,
|
|
2923
2862
|
method: 1 ,
|
|
2924
2863
|
assembly: 0 ,
|
|
2925
2864
|
fileName: 0 ,
|
|
2926
2865
|
line: 0
|
|
2927
2866
|
};
|
|
2867
|
+
var _self = this;
|
|
2868
|
+
_self.sizeInBytes = 0;
|
|
2928
2869
|
if (typeof sourceFrame === "string") {
|
|
2929
2870
|
var frame = sourceFrame;
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2871
|
+
_self.level = level;
|
|
2872
|
+
_self.method = NoMethod;
|
|
2873
|
+
_self.assembly = strTrim(frame);
|
|
2874
|
+
_self.fileName = "";
|
|
2875
|
+
_self.line = 0;
|
|
2935
2876
|
var matches = frame.match(_StackFrame.regex);
|
|
2936
2877
|
if (matches && matches.length >= 5) {
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2878
|
+
_self.method = strTrim(matches[2]) || _self.method;
|
|
2879
|
+
_self.fileName = strTrim(matches[4]);
|
|
2880
|
+
_self.line = parseInt(matches[5]) || 0;
|
|
2940
2881
|
}
|
|
2941
2882
|
}
|
|
2942
2883
|
else {
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
}
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
return _this;
|
|
2884
|
+
_self.level = sourceFrame.level;
|
|
2885
|
+
_self.method = sourceFrame.method;
|
|
2886
|
+
_self.assembly = sourceFrame.assembly;
|
|
2887
|
+
_self.fileName = sourceFrame.fileName;
|
|
2888
|
+
_self.line = sourceFrame.line;
|
|
2889
|
+
_self.sizeInBytes = 0;
|
|
2890
|
+
}
|
|
2891
|
+
_self.sizeInBytes += _self.method.length;
|
|
2892
|
+
_self.sizeInBytes += _self.fileName.length;
|
|
2893
|
+
_self.sizeInBytes += _self.assembly.length;
|
|
2894
|
+
_self.sizeInBytes += _StackFrame.baseSize;
|
|
2895
|
+
_self.sizeInBytes += _self.level.toString().length;
|
|
2896
|
+
_self.sizeInBytes += _self.line.toString().length;
|
|
2957
2897
|
}
|
|
2958
2898
|
_StackFrame.CreateFromInterface = function (frame) {
|
|
2959
2899
|
return new _StackFrame(frame, null );
|
|
2960
2900
|
};
|
|
2961
2901
|
_StackFrame.prototype.toInterface = function () {
|
|
2902
|
+
var _self = this;
|
|
2962
2903
|
return {
|
|
2963
|
-
level:
|
|
2964
|
-
method:
|
|
2965
|
-
assembly:
|
|
2966
|
-
fileName:
|
|
2967
|
-
line:
|
|
2904
|
+
level: _self.level,
|
|
2905
|
+
method: _self.method,
|
|
2906
|
+
assembly: _self.assembly,
|
|
2907
|
+
fileName: _self.fileName,
|
|
2908
|
+
line: _self.line
|
|
2968
2909
|
};
|
|
2969
2910
|
};
|
|
2970
2911
|
_StackFrame.regex = /^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/;
|
|
2971
2912
|
_StackFrame.baseSize = 58;
|
|
2972
2913
|
return _StackFrame;
|
|
2973
|
-
}(StackFrame));
|
|
2974
|
-
|
|
2975
|
-
var MetricData = /** @class */ (function () {
|
|
2976
|
-
function MetricData() {
|
|
2977
|
-
this.ver = 2;
|
|
2978
|
-
this.metrics = [];
|
|
2979
|
-
this.properties = {};
|
|
2980
|
-
this.measurements = {};
|
|
2981
|
-
}
|
|
2982
|
-
return MetricData;
|
|
2983
|
-
}());
|
|
2984
|
-
|
|
2985
|
-
var DataPointType;
|
|
2986
|
-
(function (DataPointType) {
|
|
2987
|
-
DataPointType[DataPointType["Measurement"] = 0] = "Measurement";
|
|
2988
|
-
DataPointType[DataPointType["Aggregation"] = 1] = "Aggregation";
|
|
2989
|
-
})(DataPointType || (DataPointType = {}));
|
|
2990
|
-
|
|
2991
|
-
var DataPoint$1 = /** @class */ (function () {
|
|
2992
|
-
function DataPoint() {
|
|
2993
|
-
this.kind = DataPointType.Measurement;
|
|
2994
|
-
}
|
|
2995
|
-
return DataPoint;
|
|
2996
2914
|
}());
|
|
2997
2915
|
|
|
2998
|
-
var DataPoint = /** @class */ (function (
|
|
2999
|
-
__extendsFn(DataPoint, _super);
|
|
2916
|
+
var DataPoint = /** @class */ (function () {
|
|
3000
2917
|
function DataPoint() {
|
|
3001
|
-
|
|
3002
|
-
_this.aiDataContract = {
|
|
2918
|
+
this.aiDataContract = {
|
|
3003
2919
|
name: 1 ,
|
|
3004
2920
|
kind: 0 ,
|
|
3005
2921
|
value: 1 ,
|
|
@@ -3008,20 +2924,20 @@
|
|
|
3008
2924
|
max: 0 ,
|
|
3009
2925
|
stdDev: 0
|
|
3010
2926
|
};
|
|
3011
|
-
|
|
2927
|
+
this.kind = 0 ;
|
|
3012
2928
|
}
|
|
3013
2929
|
return DataPoint;
|
|
3014
|
-
}(
|
|
2930
|
+
}());
|
|
3015
2931
|
|
|
3016
|
-
var Metric = /** @class */ (function (
|
|
3017
|
-
__extendsFn(Metric, _super);
|
|
2932
|
+
var Metric = /** @class */ (function () {
|
|
3018
2933
|
function Metric(logger, name, value, count, min, max, stdDev, properties, measurements) {
|
|
3019
|
-
|
|
3020
|
-
_this.aiDataContract = {
|
|
2934
|
+
this.aiDataContract = {
|
|
3021
2935
|
ver: 1 ,
|
|
3022
2936
|
metrics: 1 ,
|
|
3023
2937
|
properties: 0
|
|
3024
2938
|
};
|
|
2939
|
+
var _self = this;
|
|
2940
|
+
_self.ver = 2;
|
|
3025
2941
|
var dataPoint = new DataPoint();
|
|
3026
2942
|
dataPoint.count = count > 0 ? count : undefined;
|
|
3027
2943
|
dataPoint.max = isNaN(max) || max === null ? undefined : max;
|
|
@@ -3029,33 +2945,18 @@
|
|
|
3029
2945
|
dataPoint.name = dataSanitizeString(logger, name) || strNotSpecified;
|
|
3030
2946
|
dataPoint.value = value;
|
|
3031
2947
|
dataPoint.stdDev = isNaN(stdDev) || stdDev === null ? undefined : stdDev;
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
return _this;
|
|
2948
|
+
_self.metrics = [dataPoint];
|
|
2949
|
+
_self.properties = dataSanitizeProperties(logger, properties);
|
|
2950
|
+
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
3036
2951
|
}
|
|
3037
2952
|
Metric.envelopeType = "Microsoft.ApplicationInsights.{0}.Metric";
|
|
3038
2953
|
Metric.dataType = "MetricData";
|
|
3039
2954
|
return Metric;
|
|
3040
|
-
}(
|
|
3041
|
-
|
|
3042
|
-
var PageViewData = /** @class */ (function (_super) {
|
|
3043
|
-
__extendsFn(PageViewData, _super);
|
|
3044
|
-
function PageViewData() {
|
|
3045
|
-
var _this = _super.call(this) || this;
|
|
3046
|
-
_this.ver = 2;
|
|
3047
|
-
_this.properties = {};
|
|
3048
|
-
_this.measurements = {};
|
|
3049
|
-
return _this;
|
|
3050
|
-
}
|
|
3051
|
-
return PageViewData;
|
|
3052
|
-
}(EventData));
|
|
2955
|
+
}());
|
|
3053
2956
|
|
|
3054
|
-
var PageView = /** @class */ (function (
|
|
3055
|
-
__extendsFn(PageView, _super);
|
|
2957
|
+
var PageView = /** @class */ (function () {
|
|
3056
2958
|
function PageView(logger, name, url, durationMs, properties, measurements, id) {
|
|
3057
|
-
|
|
3058
|
-
_this.aiDataContract = {
|
|
2959
|
+
this.aiDataContract = {
|
|
3059
2960
|
ver: 1 ,
|
|
3060
2961
|
name: 0 ,
|
|
3061
2962
|
url: 0 ,
|
|
@@ -3064,37 +2965,26 @@
|
|
|
3064
2965
|
measurements: 0 ,
|
|
3065
2966
|
id: 0
|
|
3066
2967
|
};
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
2968
|
+
var _self = this;
|
|
2969
|
+
_self.ver = 2;
|
|
2970
|
+
_self.id = dataSanitizeId(logger, id);
|
|
2971
|
+
_self.url = dataSanitizeUrl(logger, url);
|
|
2972
|
+
_self.name = dataSanitizeString(logger, name) || strNotSpecified;
|
|
3070
2973
|
if (!isNaN(durationMs)) {
|
|
3071
|
-
|
|
2974
|
+
_self.duration = msToTimeSpan(durationMs);
|
|
3072
2975
|
}
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
return _this;
|
|
2976
|
+
_self.properties = dataSanitizeProperties(logger, properties);
|
|
2977
|
+
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
3076
2978
|
}
|
|
3077
2979
|
PageView.envelopeType = "Microsoft.ApplicationInsights.{0}.Pageview";
|
|
3078
2980
|
PageView.dataType = "PageviewData";
|
|
3079
2981
|
return PageView;
|
|
3080
|
-
}(PageViewData));
|
|
3081
|
-
|
|
3082
|
-
var RemoteDependencyData$1 = /** @class */ (function () {
|
|
3083
|
-
function RemoteDependencyData() {
|
|
3084
|
-
this.ver = 2;
|
|
3085
|
-
this.success = true;
|
|
3086
|
-
this.properties = {};
|
|
3087
|
-
this.measurements = {};
|
|
3088
|
-
}
|
|
3089
|
-
return RemoteDependencyData;
|
|
3090
2982
|
}());
|
|
3091
2983
|
|
|
3092
|
-
var RemoteDependencyData = /** @class */ (function (
|
|
3093
|
-
__extendsFn(RemoteDependencyData, _super);
|
|
2984
|
+
var RemoteDependencyData = /** @class */ (function () {
|
|
3094
2985
|
function RemoteDependencyData(logger, id, absoluteUrl, commandName, value, success, resultCode, method, requestAPI, correlationContext, properties, measurements) {
|
|
3095
2986
|
if (requestAPI === void 0) { requestAPI = "Ajax"; }
|
|
3096
|
-
|
|
3097
|
-
_this.aiDataContract = {
|
|
2987
|
+
this.aiDataContract = {
|
|
3098
2988
|
id: 1 ,
|
|
3099
2989
|
ver: 1 ,
|
|
3100
2990
|
name: 0 ,
|
|
@@ -3117,77 +3007,54 @@
|
|
|
3117
3007
|
commandName: 0 ,
|
|
3118
3008
|
dependencyTypeName: 0
|
|
3119
3009
|
};
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3010
|
+
var _self = this;
|
|
3011
|
+
_self.ver = 2;
|
|
3012
|
+
_self.id = id;
|
|
3013
|
+
_self.duration = msToTimeSpan(value);
|
|
3014
|
+
_self.success = success;
|
|
3015
|
+
_self.resultCode = resultCode + "";
|
|
3016
|
+
_self.type = dataSanitizeString(logger, requestAPI);
|
|
3125
3017
|
var dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);
|
|
3126
|
-
|
|
3127
|
-
|
|
3018
|
+
_self.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data;
|
|
3019
|
+
_self.target = dataSanitizeString(logger, dependencyFields.target);
|
|
3128
3020
|
if (correlationContext) {
|
|
3129
|
-
|
|
3021
|
+
_self.target = "".concat(_self.target, " | ").concat(correlationContext);
|
|
3130
3022
|
}
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
return _this;
|
|
3023
|
+
_self.name = dataSanitizeString(logger, dependencyFields.name);
|
|
3024
|
+
_self.properties = dataSanitizeProperties(logger, properties);
|
|
3025
|
+
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
3135
3026
|
}
|
|
3136
3027
|
RemoteDependencyData.envelopeType = "Microsoft.ApplicationInsights.{0}.RemoteDependency";
|
|
3137
3028
|
RemoteDependencyData.dataType = "RemoteDependencyData";
|
|
3138
3029
|
return RemoteDependencyData;
|
|
3139
|
-
}(RemoteDependencyData$1));
|
|
3140
|
-
|
|
3141
|
-
var MessageData = /** @class */ (function () {
|
|
3142
|
-
function MessageData() {
|
|
3143
|
-
this.ver = 2;
|
|
3144
|
-
this.properties = {};
|
|
3145
|
-
this.measurements = {};
|
|
3146
|
-
}
|
|
3147
|
-
return MessageData;
|
|
3148
3030
|
}());
|
|
3149
3031
|
|
|
3150
|
-
var Trace = /** @class */ (function (
|
|
3151
|
-
__extendsFn(Trace, _super);
|
|
3032
|
+
var Trace = /** @class */ (function () {
|
|
3152
3033
|
function Trace(logger, message, severityLevel, properties, measurements) {
|
|
3153
|
-
|
|
3154
|
-
_this.aiDataContract = {
|
|
3034
|
+
this.aiDataContract = {
|
|
3155
3035
|
ver: 1 ,
|
|
3156
3036
|
message: 1 ,
|
|
3157
3037
|
severityLevel: 0 ,
|
|
3158
3038
|
properties: 0
|
|
3159
3039
|
};
|
|
3040
|
+
var _self = this;
|
|
3041
|
+
_self.ver = 2;
|
|
3160
3042
|
message = message || strNotSpecified;
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3043
|
+
_self.message = dataSanitizeMessage(logger, message);
|
|
3044
|
+
_self.properties = dataSanitizeProperties(logger, properties);
|
|
3045
|
+
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
3164
3046
|
if (severityLevel) {
|
|
3165
|
-
|
|
3047
|
+
_self.severityLevel = severityLevel;
|
|
3166
3048
|
}
|
|
3167
|
-
return _this;
|
|
3168
3049
|
}
|
|
3169
3050
|
Trace.envelopeType = "Microsoft.ApplicationInsights.{0}.Message";
|
|
3170
3051
|
Trace.dataType = "MessageData";
|
|
3171
3052
|
return Trace;
|
|
3172
|
-
}(
|
|
3173
|
-
|
|
3174
|
-
var PageViewPerfData = /** @class */ (function (_super) {
|
|
3175
|
-
__extendsFn(PageViewPerfData, _super);
|
|
3176
|
-
function PageViewPerfData() {
|
|
3177
|
-
var _this = _super.call(this) || this;
|
|
3178
|
-
_this.ver = 2;
|
|
3179
|
-
_this.properties = {};
|
|
3180
|
-
_this.measurements = {};
|
|
3181
|
-
return _this;
|
|
3182
|
-
}
|
|
3183
|
-
return PageViewPerfData;
|
|
3184
|
-
}(PageViewData));
|
|
3053
|
+
}());
|
|
3185
3054
|
|
|
3186
|
-
var PageViewPerformance = /** @class */ (function (
|
|
3187
|
-
__extendsFn(PageViewPerformance, _super);
|
|
3055
|
+
var PageViewPerformance = /** @class */ (function () {
|
|
3188
3056
|
function PageViewPerformance(logger, name, url, unused, properties, measurements, cs4BaseData) {
|
|
3189
|
-
|
|
3190
|
-
_this.aiDataContract = {
|
|
3057
|
+
this.aiDataContract = {
|
|
3191
3058
|
ver: 1 ,
|
|
3192
3059
|
name: 0 ,
|
|
3193
3060
|
url: 0 ,
|
|
@@ -3200,39 +3067,37 @@
|
|
|
3200
3067
|
properties: 0 ,
|
|
3201
3068
|
measurements: 0
|
|
3202
3069
|
};
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3070
|
+
var _self = this;
|
|
3071
|
+
_self.ver = 2;
|
|
3072
|
+
_self.url = dataSanitizeUrl(logger, url);
|
|
3073
|
+
_self.name = dataSanitizeString(logger, name) || strNotSpecified;
|
|
3074
|
+
_self.properties = dataSanitizeProperties(logger, properties);
|
|
3075
|
+
_self.measurements = dataSanitizeMeasurements(logger, measurements);
|
|
3207
3076
|
if (cs4BaseData) {
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3077
|
+
_self.domProcessing = cs4BaseData.domProcessing;
|
|
3078
|
+
_self.duration = cs4BaseData.duration;
|
|
3079
|
+
_self.networkConnect = cs4BaseData.networkConnect;
|
|
3080
|
+
_self.perfTotal = cs4BaseData.perfTotal;
|
|
3081
|
+
_self.receivedResponse = cs4BaseData.receivedResponse;
|
|
3082
|
+
_self.sentRequest = cs4BaseData.sentRequest;
|
|
3214
3083
|
}
|
|
3215
|
-
return _this;
|
|
3216
3084
|
}
|
|
3217
3085
|
PageViewPerformance.envelopeType = "Microsoft.ApplicationInsights.{0}.PageviewPerformance";
|
|
3218
3086
|
PageViewPerformance.dataType = "PageviewPerformanceData";
|
|
3219
3087
|
return PageViewPerformance;
|
|
3220
|
-
}(
|
|
3088
|
+
}());
|
|
3221
3089
|
|
|
3222
|
-
var Data = /** @class */ (function (
|
|
3223
|
-
__extendsFn(Data, _super);
|
|
3090
|
+
var Data = /** @class */ (function () {
|
|
3224
3091
|
function Data(baseType, data) {
|
|
3225
|
-
|
|
3226
|
-
_this.aiDataContract = {
|
|
3092
|
+
this.aiDataContract = {
|
|
3227
3093
|
baseType: 1 ,
|
|
3228
3094
|
baseData: 1
|
|
3229
3095
|
};
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
return _this;
|
|
3096
|
+
this.baseType = baseType;
|
|
3097
|
+
this.baseData = data;
|
|
3233
3098
|
}
|
|
3234
3099
|
return Data;
|
|
3235
|
-
}(
|
|
3100
|
+
}());
|
|
3236
3101
|
|
|
3237
3102
|
function _aiNameFunc(baseName) {
|
|
3238
3103
|
var aiName = "ai." + baseName + ".";
|
|
@@ -3595,7 +3460,7 @@
|
|
|
3595
3460
|
}
|
|
3596
3461
|
}
|
|
3597
3462
|
var EnvelopeCreator = {
|
|
3598
|
-
Version: "2.8.0-
|
|
3463
|
+
Version: "2.8.0-nightly.2204-04"
|
|
3599
3464
|
};
|
|
3600
3465
|
function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
|
|
3601
3466
|
EnvelopeCreatorInit(logger, telemetryItem);
|