@microsoft/applicationinsights-channel-js 3.0.0-beta.2303-11 → 3.0.0-beta.2304-07
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/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.cjs.js +5768 -0
- package/browser/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.cjs.js.map +1 -0
- package/browser/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.cjs.min.js +6 -0
- package/browser/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.cjs.min.js.map +1 -0
- package/browser/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.gbl.js +5772 -0
- package/browser/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.gbl.js.map +1 -0
- package/browser/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.gbl.min.js +6 -0
- package/browser/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.gbl.min.js.map +1 -0
- package/browser/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.integrity.json +66 -0
- package/browser/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.js +5774 -0
- package/browser/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.js.map +1 -0
- package/browser/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.min.js +6 -0
- package/browser/es5/applicationinsights-channel-js.3.0.0-beta.2304-07.min.js.map +1 -0
- package/browser/es5/applicationinsights-channel-js.3.cjs.js +5768 -0
- package/browser/es5/applicationinsights-channel-js.3.cjs.js.map +1 -0
- package/browser/es5/applicationinsights-channel-js.3.cjs.min.js +6 -0
- package/browser/es5/applicationinsights-channel-js.3.cjs.min.js.map +1 -0
- package/browser/es5/applicationinsights-channel-js.3.gbl.js +5772 -0
- package/browser/es5/applicationinsights-channel-js.3.gbl.js.map +1 -0
- package/browser/es5/applicationinsights-channel-js.3.gbl.min.js +6 -0
- package/browser/es5/applicationinsights-channel-js.3.gbl.min.js.map +1 -0
- package/{dist/applicationinsights-channel-js.js → browser/es5/applicationinsights-channel-js.3.js} +875 -829
- package/browser/es5/applicationinsights-channel-js.3.js.map +1 -0
- package/browser/es5/applicationinsights-channel-js.3.min.js +6 -0
- package/browser/es5/applicationinsights-channel-js.3.min.js.map +1 -0
- package/{browser → dist/es5}/applicationinsights-channel-js.js +874 -828
- package/dist/es5/applicationinsights-channel-js.js.map +1 -0
- package/dist/es5/applicationinsights-channel-js.min.js +6 -0
- package/dist/es5/applicationinsights-channel-js.min.js.map +1 -0
- package/{dist-esm → dist-es5}/EnvelopeCreator.js +2 -2
- package/{dist-esm → dist-es5}/EnvelopeCreator.js.map +1 -1
- package/{dist-esm → dist-es5}/Interfaces.js +1 -1
- package/{dist-esm → dist-es5}/InternalConstants.js +1 -1
- package/{dist-esm → dist-es5}/Offline.js +8 -7
- package/dist-es5/Offline.js.map +1 -0
- package/{dist-esm → dist-es5}/SendBuffer.js +1 -1
- package/{dist-esm → dist-es5}/Sender.js +6 -4
- package/dist-es5/Sender.js.map +1 -0
- package/{dist-esm → dist-es5}/Serializer.js +1 -1
- package/{dist-esm → dist-es5}/TelemetryProcessors/Sample.js +1 -1
- package/{dist-esm → dist-es5}/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +1 -1
- package/{dist-esm → dist-es5}/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +1 -1
- package/{dist-esm → dist-es5}/__DynamicConstants.js +2 -1
- package/dist-es5/__DynamicConstants.js.map +1 -0
- package/{dist-esm → dist-es5}/applicationinsights-channel-js.js +1 -1
- package/package.json +17 -16
- package/tsconfig.json +5 -4
- package/types/applicationinsights-channel-js.d.ts +284 -1
- package/{dist/applicationinsights-channel-js.d.ts → types/applicationinsights-channel-js.namespaced.d.ts} +1 -1
- package/browser/applicationinsights-channel-js.integrity.json +0 -26
- package/browser/applicationinsights-channel-js.js.map +0 -1
- package/browser/applicationinsights-channel-js.min.js +0 -6
- package/browser/applicationinsights-channel-js.min.js.map +0 -1
- package/dist/applicationinsights-channel-js.api.json +0 -1357
- package/dist/applicationinsights-channel-js.api.md +0 -60
- package/dist/applicationinsights-channel-js.js.map +0 -1
- package/dist/applicationinsights-channel-js.min.js +0 -6
- package/dist/applicationinsights-channel-js.min.js.map +0 -1
- package/dist/applicationinsights-channel-js.rollup.d.ts +0 -285
- package/dist-esm/Offline.js.map +0 -1
- package/dist-esm/Sender.js.map +0 -1
- package/dist-esm/__DynamicConstants.js.map +0 -1
- package/src/EnvelopeCreator.ts +0 -351
- package/src/Interfaces.ts +0 -114
- package/src/InternalConstants.ts +0 -11
- package/src/Offline.ts +0 -106
- package/src/SendBuffer.ts +0 -396
- package/src/Sender.ts +0 -1256
- package/src/Serializer.ts +0 -177
- package/src/TelemetryProcessors/Sample.ts +0 -49
- package/src/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.ts +0 -37
- package/src/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.ts +0 -35
- package/src/__DynamicConstants.ts +0 -64
- package/src/applicationinsights-channel-js.ts +0 -1
- package/types/EnvelopeCreator.d.ts +0 -12
- package/types/Interfaces.d.ts +0 -95
- package/types/InternalConstants.d.ts +0 -1
- package/types/Offline.d.ts +0 -10
- package/types/SendBuffer.d.ts +0 -73
- package/types/Sender.d.ts +0 -84
- package/types/Serializer.d.ts +0 -9
- package/types/TelemetryProcessors/Sample.d.ts +0 -12
- package/types/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.d.ts +0 -5
- package/types/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.d.ts +0 -5
- package/types/__DynamicConstants.d.ts +0 -52
- package/types/tsdoc-metadata.json +0 -11
- /package/{dist-esm → dist-es5}/Interfaces.js.map +0 -0
- /package/{dist-esm → dist-es5}/InternalConstants.js.map +0 -0
- /package/{dist-esm → dist-es5}/SendBuffer.js.map +0 -0
- /package/{dist-esm → dist-es5}/Serializer.js.map +0 -0
- /package/{dist-esm → dist-es5}/TelemetryProcessors/Sample.js.map +0 -0
- /package/{dist-esm → dist-es5}/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js.map +0 -0
- /package/{dist-esm → dist-es5}/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js.map +0 -0
- /package/{dist-esm → dist-es5}/applicationinsights-channel-js.js.map +0 -0
package/src/Serializer.ts
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import dynamicProto from "@microsoft/dynamicproto-js"
|
|
2
|
-
import {
|
|
3
|
-
IDiagnosticLogger, _eInternalMessageId, _throwInternal, eLoggingSeverity, getJSON, isArray, isFunction, isObject, objForEachKey
|
|
4
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
5
|
-
import { FieldType, ISerializable } from "@microsoft/applicationinsights-common";
|
|
6
|
-
|
|
7
|
-
export class Serializer {
|
|
8
|
-
|
|
9
|
-
constructor(logger: IDiagnosticLogger) {
|
|
10
|
-
dynamicProto(Serializer, this, (_self) => {
|
|
11
|
-
/**
|
|
12
|
-
* Serializes the current object to a JSON string.
|
|
13
|
-
*/
|
|
14
|
-
_self.serialize = (input: ISerializable): string => {
|
|
15
|
-
const output = _serializeObject(input, "root");
|
|
16
|
-
try {
|
|
17
|
-
return getJSON().stringify(output);
|
|
18
|
-
} catch (e) {
|
|
19
|
-
// if serialization fails return an empty string
|
|
20
|
-
_throwInternal(logger, eLoggingSeverity.CRITICAL, _eInternalMessageId.CannotSerializeObject, (e && isFunction(e.toString)) ? e.toString() : "Error serializing object", null, true);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function _serializeObject(source: ISerializable, name: string): any {
|
|
25
|
-
const circularReferenceCheck = "__aiCircularRefCheck";
|
|
26
|
-
let output = {};
|
|
27
|
-
|
|
28
|
-
if (!source) {
|
|
29
|
-
_throwInternal(logger, eLoggingSeverity.CRITICAL, _eInternalMessageId.CannotSerializeObject, "cannot serialize object because it is null or undefined", { name }, true);
|
|
30
|
-
return output;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (source[circularReferenceCheck]) {
|
|
34
|
-
_throwInternal(logger, eLoggingSeverity.WARNING, _eInternalMessageId.CircularReferenceDetected, "Circular reference detected while serializing object", { name }, true);
|
|
35
|
-
return output;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (!source.aiDataContract) {
|
|
39
|
-
// special case for measurements/properties/tags
|
|
40
|
-
if (name === "measurements") {
|
|
41
|
-
output = _serializeStringMap(source, "number", name);
|
|
42
|
-
} else if (name === "properties") {
|
|
43
|
-
output = _serializeStringMap(source, "string", name);
|
|
44
|
-
} else if (name === "tags") {
|
|
45
|
-
output = _serializeStringMap(source, "string", name);
|
|
46
|
-
} else if (isArray(source)) {
|
|
47
|
-
output = _serializeArray(source as any, name);
|
|
48
|
-
} else {
|
|
49
|
-
_throwInternal(logger, eLoggingSeverity.WARNING, _eInternalMessageId.CannotSerializeObjectNonSerializable, "Attempting to serialize an object which does not implement ISerializable", { name }, true);
|
|
50
|
-
|
|
51
|
-
try {
|
|
52
|
-
// verify that the object can be stringified
|
|
53
|
-
getJSON().stringify(source);
|
|
54
|
-
output = source;
|
|
55
|
-
} catch (e) {
|
|
56
|
-
// if serialization fails return an empty string
|
|
57
|
-
_throwInternal(logger, eLoggingSeverity.CRITICAL, _eInternalMessageId.CannotSerializeObject, (e && isFunction(e.toString)) ? e.toString() : "Error serializing object", null, true);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return output;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
source[circularReferenceCheck] = true;
|
|
65
|
-
objForEachKey(source.aiDataContract, (field, contract) => {
|
|
66
|
-
const isRequired = (isFunction(contract)) ? (contract() & FieldType.Required) : (contract & FieldType.Required);
|
|
67
|
-
const isHidden = (isFunction(contract)) ? (contract() & FieldType.Hidden) : (contract & FieldType.Hidden);
|
|
68
|
-
const isArray = contract & FieldType.Array;
|
|
69
|
-
|
|
70
|
-
const isPresent = source[field] !== undefined;
|
|
71
|
-
const isObj = isObject(source[field]) && source[field] !== null;
|
|
72
|
-
|
|
73
|
-
if (isRequired && !isPresent && !isArray) {
|
|
74
|
-
_throwInternal(logger,
|
|
75
|
-
eLoggingSeverity.CRITICAL,
|
|
76
|
-
_eInternalMessageId.MissingRequiredFieldSpecification,
|
|
77
|
-
"Missing required field specification. The field is required but not present on source",
|
|
78
|
-
{ field, name });
|
|
79
|
-
|
|
80
|
-
// If not in debug mode, continue and hope the error is permissible
|
|
81
|
-
} else if (!isHidden) { // Don't serialize hidden fields
|
|
82
|
-
let value;
|
|
83
|
-
if (isObj) {
|
|
84
|
-
if (isArray) {
|
|
85
|
-
// special case; recurse on each object in the source array
|
|
86
|
-
value = _serializeArray(source[field], field);
|
|
87
|
-
} else {
|
|
88
|
-
// recurse on the source object in this field
|
|
89
|
-
value = _serializeObject(source[field], field);
|
|
90
|
-
}
|
|
91
|
-
} else {
|
|
92
|
-
// assign the source field to the output even if undefined or required
|
|
93
|
-
value = source[field];
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// only emit this field if the value is defined
|
|
97
|
-
if (value !== undefined) {
|
|
98
|
-
output[field] = value;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
delete source[circularReferenceCheck];
|
|
104
|
-
return output;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function _serializeArray(sources: ISerializable[], name: string): any[] {
|
|
108
|
-
let output: any[];
|
|
109
|
-
|
|
110
|
-
if (!!sources) {
|
|
111
|
-
if (!isArray(sources)) {
|
|
112
|
-
_throwInternal(logger,
|
|
113
|
-
eLoggingSeverity.CRITICAL,
|
|
114
|
-
_eInternalMessageId.ItemNotInArray,
|
|
115
|
-
"This field was specified as an array in the contract but the item is not an array.\r\n",
|
|
116
|
-
{ name }, true);
|
|
117
|
-
} else {
|
|
118
|
-
output = [];
|
|
119
|
-
for (let i = 0; i < sources.length; i++) {
|
|
120
|
-
const source = sources[i];
|
|
121
|
-
const item = _serializeObject(source, name + "[" + i + "]");
|
|
122
|
-
output.push(item);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return output;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function _serializeStringMap(map: any, expectedType: string, name: string) {
|
|
131
|
-
let output: any;
|
|
132
|
-
if (map) {
|
|
133
|
-
output = {};
|
|
134
|
-
objForEachKey(map, (field, value) => {
|
|
135
|
-
if (expectedType === "string") {
|
|
136
|
-
if (value === undefined) {
|
|
137
|
-
output[field] = "undefined";
|
|
138
|
-
} else if (value === null) {
|
|
139
|
-
output[field] = "null";
|
|
140
|
-
} else if (!value.toString) {
|
|
141
|
-
output[field] = "invalid field: toString() is not defined.";
|
|
142
|
-
} else {
|
|
143
|
-
output[field] = value.toString();
|
|
144
|
-
}
|
|
145
|
-
} else if (expectedType === "number") {
|
|
146
|
-
if (value === undefined) {
|
|
147
|
-
output[field] = "undefined";
|
|
148
|
-
} else if (value === null) {
|
|
149
|
-
output[field] = "null";
|
|
150
|
-
} else {
|
|
151
|
-
const num = parseFloat(value);
|
|
152
|
-
if (isNaN(num)) {
|
|
153
|
-
output[field] = "NaN";
|
|
154
|
-
} else {
|
|
155
|
-
output[field] = num;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
} else {
|
|
159
|
-
output[field] = "invalid field: " + name + " is of unknown type.";
|
|
160
|
-
_throwInternal(logger, eLoggingSeverity.CRITICAL, output[field], null, true);
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
return output;
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Serializes the current object to a JSON string.
|
|
172
|
-
*/
|
|
173
|
-
public serialize(input: ISerializable): string {
|
|
174
|
-
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
175
|
-
return null;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { ISample, Metric } from "@microsoft/applicationinsights-common";
|
|
5
|
-
import {
|
|
6
|
-
IDiagnosticLogger, ITelemetryItem, _eInternalMessageId, eLoggingSeverity, safeGetLogger
|
|
7
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
8
|
-
import { SamplingScoreGenerator } from "./SamplingScoreGenerators/SamplingScoreGenerator";
|
|
9
|
-
|
|
10
|
-
export class Sample implements ISample {
|
|
11
|
-
public sampleRate: number;
|
|
12
|
-
|
|
13
|
-
// We're using 32 bit math, hence max value is (2^31 - 1)
|
|
14
|
-
public INT_MAX_VALUE: number = 2147483647;
|
|
15
|
-
private samplingScoreGenerator: SamplingScoreGenerator;
|
|
16
|
-
|
|
17
|
-
constructor(sampleRate: number, logger?: IDiagnosticLogger) {
|
|
18
|
-
let _logger = logger || safeGetLogger(null);
|
|
19
|
-
|
|
20
|
-
if (sampleRate > 100 || sampleRate < 0) {
|
|
21
|
-
_logger.throwInternal(eLoggingSeverity.WARNING,
|
|
22
|
-
_eInternalMessageId.SampleRateOutOfRange,
|
|
23
|
-
"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",
|
|
24
|
-
{ samplingRate: sampleRate }, true);
|
|
25
|
-
sampleRate = 100;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
this.sampleRate = sampleRate;
|
|
29
|
-
this.samplingScoreGenerator = new SamplingScoreGenerator();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Determines if an envelope is sampled in (i.e. will be sent) or not (i.e. will be dropped).
|
|
34
|
-
*/
|
|
35
|
-
public isSampledIn(envelope: ITelemetryItem): boolean {
|
|
36
|
-
const samplingPercentage = this.sampleRate; // 0 - 100
|
|
37
|
-
let isSampledIn = false;
|
|
38
|
-
|
|
39
|
-
if (samplingPercentage === null || samplingPercentage === undefined || samplingPercentage >= 100) {
|
|
40
|
-
return true;
|
|
41
|
-
} else if (envelope.baseType === Metric.dataType) {
|
|
42
|
-
// exclude MetricData telemetry from sampling
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
isSampledIn = this.samplingScoreGenerator.getSamplingScore(envelope) < samplingPercentage;
|
|
47
|
-
return isSampledIn;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
// (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution
|
|
5
|
-
const MIN_INPUT_LENGTH: number = 8;
|
|
6
|
-
|
|
7
|
-
export class HashCodeScoreGenerator {
|
|
8
|
-
// We're using 32 bit math, hence max value is (2^31 - 1)
|
|
9
|
-
public static INT_MAX_VALUE: number = 2147483647;
|
|
10
|
-
|
|
11
|
-
public getHashCodeScore(key: string): number {
|
|
12
|
-
const score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE;
|
|
13
|
-
return score * 100;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
public getHashCode(input: string): number {
|
|
17
|
-
if (input === "") {
|
|
18
|
-
return 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
while (input.length < MIN_INPUT_LENGTH) {
|
|
22
|
-
input = input.concat(input);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function
|
|
26
|
-
let hash: number = 5381;
|
|
27
|
-
|
|
28
|
-
for (let i: number = 0; i < input.length; ++i) {
|
|
29
|
-
hash = ((hash << 5) + hash) + input.charCodeAt(i);
|
|
30
|
-
// 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type)
|
|
31
|
-
// 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is.
|
|
32
|
-
hash = hash & hash;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return Math.abs(hash);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import { ContextTagKeys } from "@microsoft/applicationinsights-common";
|
|
5
|
-
import { ITelemetryItem } from "@microsoft/applicationinsights-core-js";
|
|
6
|
-
import { HashCodeScoreGenerator } from "./HashCodeScoreGenerator";
|
|
7
|
-
|
|
8
|
-
export class SamplingScoreGenerator {
|
|
9
|
-
|
|
10
|
-
public getSamplingScore: (item: ITelemetryItem) => number;
|
|
11
|
-
|
|
12
|
-
constructor() {
|
|
13
|
-
let _self = this;
|
|
14
|
-
let hashCodeGenerator: HashCodeScoreGenerator = new HashCodeScoreGenerator();
|
|
15
|
-
let keys: ContextTagKeys = new ContextTagKeys();
|
|
16
|
-
|
|
17
|
-
_self.getSamplingScore = (item: ITelemetryItem): number => {
|
|
18
|
-
let score: number = 0;
|
|
19
|
-
if (item.tags && item.tags[keys.userId]) { // search in tags first, then ext
|
|
20
|
-
score = hashCodeGenerator.getHashCodeScore(item.tags[keys.userId]);
|
|
21
|
-
} else if (item.ext && item.ext.user && item.ext.user.id) {
|
|
22
|
-
score = hashCodeGenerator.getHashCodeScore(item.ext.user.id);
|
|
23
|
-
} else if (item.tags && item.tags[keys.operationId]) { // search in tags first, then ext
|
|
24
|
-
score = hashCodeGenerator.getHashCodeScore(item.tags[keys.operationId]);
|
|
25
|
-
} else if (item.ext && item.ext.telemetryTrace && item.ext.telemetryTrace.traceID) {
|
|
26
|
-
score = hashCodeGenerator.getHashCodeScore(item.ext.telemetryTrace.traceID);
|
|
27
|
-
} else {
|
|
28
|
-
// tslint:disable-next-line:insecure-random
|
|
29
|
-
score = (Math.random() * 100);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return score;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
// @skip-file-minify
|
|
4
|
-
|
|
5
|
-
// ##############################################################
|
|
6
|
-
// AUTO GENERATED FILE: This file is Auto Generated during build.
|
|
7
|
-
// ##############################################################
|
|
8
|
-
|
|
9
|
-
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
-
// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!
|
|
11
|
-
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
|
-
|
|
13
|
-
export const _DYN_TAGS = "tags"; // Count: 17
|
|
14
|
-
export const _DYN_DEVICE_TYPE = "deviceType"; // Count: 3
|
|
15
|
-
export const _DYN_DATA = "data"; // Count: 13
|
|
16
|
-
export const _DYN_NAME = "name"; // Count: 8
|
|
17
|
-
export const _DYN_TRACE_ID = "traceID"; // Count: 5
|
|
18
|
-
export const _DYN_LENGTH = "length"; // Count: 36
|
|
19
|
-
export const _DYN_STRINGIFY = "stringify"; // Count: 5
|
|
20
|
-
export const _DYN_MEASUREMENTS = "measurements"; // Count: 7
|
|
21
|
-
export const _DYN_DATA_TYPE = "dataType"; // Count: 10
|
|
22
|
-
export const _DYN_ENVELOPE_TYPE = "envelopeType"; // Count: 7
|
|
23
|
-
export const _DYN_TO_STRING = "toString"; // Count: 7
|
|
24
|
-
export const _DYN_ON_LINE = "onLine"; // Count: 4
|
|
25
|
-
export const _DYN__GET = "_get"; // Count: 5
|
|
26
|
-
export const _DYN_ENQUEUE = "enqueue"; // Count: 7
|
|
27
|
-
export const _DYN_COUNT = "count"; // Count: 6
|
|
28
|
-
export const _DYN_EVENTS_LIMIT_IN_MEM = "eventsLimitInMem"; // Count: 2
|
|
29
|
-
export const _DYN_PUSH = "push"; // Count: 6
|
|
30
|
-
export const _DYN_EMIT_LINE_DELIMITED_0 = "emitLineDelimitedJson"; // Count: 3
|
|
31
|
-
export const _DYN_CLEAR = "clear"; // Count: 7
|
|
32
|
-
export const _DYN_BATCH_PAYLOADS = "batchPayloads"; // Count: 5
|
|
33
|
-
export const _DYN_CREATE_NEW = "createNew"; // Count: 3
|
|
34
|
-
export const _DYN_MARK_AS_SENT = "markAsSent"; // Count: 7
|
|
35
|
-
export const _DYN_CLEAR_SENT = "clearSent"; // Count: 5
|
|
36
|
-
export const _DYN__BUFFER__KEY = "BUFFER_KEY"; // Count: 5
|
|
37
|
-
export const _DYN__SENT__BUFFER__KEY = "SENT_BUFFER_KEY"; // Count: 8
|
|
38
|
-
export const _DYN__MAX__BUFFER__SIZE = "MAX_BUFFER_SIZE"; // Count: 5
|
|
39
|
-
export const _DYN_TRIGGER_SEND = "triggerSend"; // Count: 5
|
|
40
|
-
export const _DYN_DIAG_LOG = "diagLog"; // Count: 16
|
|
41
|
-
export const _DYN__SENDER = "_sender"; // Count: 5
|
|
42
|
-
export const _DYN_CUSTOM_HEADERS = "customHeaders"; // Count: 3
|
|
43
|
-
export const _DYN_MAX_BATCH_SIZE_IN_BY1 = "maxBatchSizeInBytes"; // Count: 2
|
|
44
|
-
export const _DYN_ONUNLOAD_DISABLE_BEA2 = "onunloadDisableBeacon"; // Count: 2
|
|
45
|
-
export const _DYN_IS_BEACON_API_DISABL3 = "isBeaconApiDisabled"; // Count: 3
|
|
46
|
-
export const _DYN_ENABLE_SESSION_STORA4 = "enableSessionStorageBuffer"; // Count: 2
|
|
47
|
-
export const _DYN__BUFFER = "_buffer"; // Count: 9
|
|
48
|
-
export const _DYN_INSTRUMENTATION_KEY = "instrumentationKey"; // Count: 2
|
|
49
|
-
export const _DYN_DISABLE_XHR = "disableXhr"; // Count: 5
|
|
50
|
-
export const _DYN_ONUNLOAD_DISABLE_FET5 = "onunloadDisableFetch"; // Count: 2
|
|
51
|
-
export const _DYN_CONVERT_UNDEFINED = "convertUndefined"; // Count: 2
|
|
52
|
-
export const _DYN_MAX_BATCH_INTERVAL = "maxBatchInterval"; // Count: 2
|
|
53
|
-
export const _DYN_BASE_TYPE = "baseType"; // Count: 4
|
|
54
|
-
export const _DYN_SAMPLE_RATE = "sampleRate"; // Count: 4
|
|
55
|
-
export const _DYN__XHR_READY_STATE_CHA6 = "_xhrReadyStateChange"; // Count: 2
|
|
56
|
-
export const _DYN__ON_ERROR = "_onError"; // Count: 11
|
|
57
|
-
export const _DYN__ON_PARTIAL_SUCCESS = "_onPartialSuccess"; // Count: 3
|
|
58
|
-
export const _DYN__ON_SUCCESS = "_onSuccess"; // Count: 6
|
|
59
|
-
export const _DYN_ITEMS_ACCEPTED = "itemsAccepted"; // Count: 5
|
|
60
|
-
export const _DYN_ITEMS_RECEIVED = "itemsReceived"; // Count: 6
|
|
61
|
-
export const _DYN_SET_REQUEST_HEADER = "setRequestHeader"; // Count: 3
|
|
62
|
-
export const _DYN_EVENTS_SEND_REQUEST = "eventsSendRequest"; // Count: 2
|
|
63
|
-
export const _DYN_GET_SAMPLING_SCORE = "getSamplingScore"; // Count: 2
|
|
64
|
-
export const _DYN_GET_HASH_CODE_SCORE = "getHashCodeScore"; // Count: 4
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Sender } from "./Sender";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IEnvelope } from "@microsoft/applicationinsights-common";
|
|
2
|
-
import { IDiagnosticLogger, ITelemetryItem } from "@microsoft/applicationinsights-core-js";
|
|
3
|
-
export declare const EnvelopeCreator: {
|
|
4
|
-
Version: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function DependencyEnvelopeCreator(logger: IDiagnosticLogger, telemetryItem: ITelemetryItem, customUndefinedValue?: any): IEnvelope;
|
|
7
|
-
export declare function EventEnvelopeCreator(logger: IDiagnosticLogger, telemetryItem: ITelemetryItem, customUndefinedValue?: any): IEnvelope;
|
|
8
|
-
export declare function ExceptionEnvelopeCreator(logger: IDiagnosticLogger, telemetryItem: ITelemetryItem, customUndefinedValue?: any): IEnvelope;
|
|
9
|
-
export declare function MetricEnvelopeCreator(logger: IDiagnosticLogger, telemetryItem: ITelemetryItem, customUndefinedValue?: any): IEnvelope;
|
|
10
|
-
export declare function PageViewEnvelopeCreator(logger: IDiagnosticLogger, telemetryItem: ITelemetryItem, customUndefinedValue?: any): IEnvelope;
|
|
11
|
-
export declare function PageViewPerformanceEnvelopeCreator(logger: IDiagnosticLogger, telemetryItem: ITelemetryItem, customUndefinedValue?: any): IEnvelope;
|
|
12
|
-
export declare function TraceEnvelopeCreator(logger: IDiagnosticLogger, telemetryItem: ITelemetryItem, customUndefinedValue?: any): IEnvelope;
|
package/types/Interfaces.d.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
export interface ISenderConfig {
|
|
2
|
-
/**
|
|
3
|
-
* The url to which payloads will be sent
|
|
4
|
-
*/
|
|
5
|
-
endpointUrl: string;
|
|
6
|
-
/**
|
|
7
|
-
* The JSON format (normal vs line delimited). True means line delimited JSON.
|
|
8
|
-
*/
|
|
9
|
-
emitLineDelimitedJson: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* The maximum size of a batch in bytes
|
|
12
|
-
*/
|
|
13
|
-
maxBatchSizeInBytes: number;
|
|
14
|
-
/**
|
|
15
|
-
* The maximum interval allowed between calls to batchInvoke
|
|
16
|
-
*/
|
|
17
|
-
maxBatchInterval: number;
|
|
18
|
-
/**
|
|
19
|
-
* The master off switch. Do not send any data if set to TRUE
|
|
20
|
-
*/
|
|
21
|
-
disableTelemetry: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Store a copy of a send buffer in the session storage
|
|
24
|
-
*/
|
|
25
|
-
enableSessionStorageBuffer: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Is retry handler disabled.
|
|
28
|
-
* If enabled, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error) and 503 (service unavailable).
|
|
29
|
-
*/
|
|
30
|
-
isRetryDisabled: boolean;
|
|
31
|
-
isBeaconApiDisabled: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Don't use XMLHttpRequest or XDomainRequest (for IE < 9) by default instead attempt to use fetch() or sendBeacon.
|
|
34
|
-
* If no other transport is available it will still use XMLHttpRequest
|
|
35
|
-
*/
|
|
36
|
-
disableXhr: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* If fetch keepalive is supported do not use it for sending events during unload, it may still fallback to fetch() without keepalive
|
|
39
|
-
*/
|
|
40
|
-
onunloadDisableFetch: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Is beacon disabled on page unload.
|
|
43
|
-
* If enabled, flush events through beaconSender.
|
|
44
|
-
*/
|
|
45
|
-
onunloadDisableBeacon: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* (Optional) Override the instrumentation key that this channel instance sends to
|
|
48
|
-
*/
|
|
49
|
-
instrumentationKey: string;
|
|
50
|
-
namePrefix: string;
|
|
51
|
-
samplingPercentage: number;
|
|
52
|
-
/**
|
|
53
|
-
* (Optional) The ability for the user to provide extra headers
|
|
54
|
-
*/
|
|
55
|
-
customHeaders: [{
|
|
56
|
-
header: string;
|
|
57
|
-
value: string;
|
|
58
|
-
}];
|
|
59
|
-
/**
|
|
60
|
-
* (Optional) Provide user an option to convert undefined field to user defined value.
|
|
61
|
-
*/
|
|
62
|
-
convertUndefined: any;
|
|
63
|
-
/**
|
|
64
|
-
* (Optional) The number of events that can be kept in memory before the SDK starts to drop events. By default, this is 10,000.
|
|
65
|
-
*/
|
|
66
|
-
eventsLimitInMem: number;
|
|
67
|
-
}
|
|
68
|
-
export interface IBackendResponse {
|
|
69
|
-
/**
|
|
70
|
-
* Number of items received by the backend
|
|
71
|
-
*/
|
|
72
|
-
readonly itemsReceived: number;
|
|
73
|
-
/**
|
|
74
|
-
* Number of items succesfuly accepted by the backend
|
|
75
|
-
*/
|
|
76
|
-
readonly itemsAccepted: number;
|
|
77
|
-
/**
|
|
78
|
-
* List of errors for items which were not accepted
|
|
79
|
-
*/
|
|
80
|
-
readonly errors: IResponseError[];
|
|
81
|
-
/**
|
|
82
|
-
* App id returned by the backend - not necessary returned, but we don't need it with each response.
|
|
83
|
-
*/
|
|
84
|
-
readonly appId?: string;
|
|
85
|
-
}
|
|
86
|
-
export interface XDomainRequest extends XMLHttpRequestEventTarget {
|
|
87
|
-
readonly responseText: string;
|
|
88
|
-
send(payload: string): void;
|
|
89
|
-
open(method: string, url: string): void;
|
|
90
|
-
}
|
|
91
|
-
export interface IResponseError {
|
|
92
|
-
readonly index: number;
|
|
93
|
-
readonly statusCode: number;
|
|
94
|
-
readonly message: string;
|
|
95
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const STR_DURATION = "duration";
|
package/types/Offline.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface IOfflineListener {
|
|
2
|
-
isOnline: () => boolean;
|
|
3
|
-
isListening: () => boolean;
|
|
4
|
-
unload: () => void;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Create a new OfflineListener instance to monitor browser online / offline events
|
|
8
|
-
* @param parentEvtNamespace - The parent event namespace to append to any specific events for this instance
|
|
9
|
-
*/
|
|
10
|
-
export declare function createOfflineListener(parentEvtNamespace?: string | string[]): IOfflineListener;
|
package/types/SendBuffer.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
2
|
-
import { ISenderConfig } from "./Interfaces";
|
|
3
|
-
export interface ISendBuffer {
|
|
4
|
-
/**
|
|
5
|
-
* Enqueue the payload
|
|
6
|
-
*/
|
|
7
|
-
enqueue: (payload: string) => void;
|
|
8
|
-
/**
|
|
9
|
-
* Returns the number of elements in the buffer
|
|
10
|
-
*/
|
|
11
|
-
count: () => number;
|
|
12
|
-
/**
|
|
13
|
-
* Returns the current size of the serialized buffer
|
|
14
|
-
*/
|
|
15
|
-
size: () => number;
|
|
16
|
-
/**
|
|
17
|
-
* Clears the buffer
|
|
18
|
-
*/
|
|
19
|
-
clear: () => void;
|
|
20
|
-
/**
|
|
21
|
-
* Returns items stored in the buffer
|
|
22
|
-
*/
|
|
23
|
-
getItems: () => string[];
|
|
24
|
-
/**
|
|
25
|
-
* Build a batch of all elements in the payload array
|
|
26
|
-
*/
|
|
27
|
-
batchPayloads: (payload: string[]) => string;
|
|
28
|
-
/**
|
|
29
|
-
* Moves items to the SENT_BUFFER.
|
|
30
|
-
* The buffer holds items which were sent, but we haven't received any response from the backend yet.
|
|
31
|
-
*/
|
|
32
|
-
markAsSent: (payload: string[]) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Removes items from the SENT_BUFFER. Should be called on successful response from the backend.
|
|
35
|
-
*/
|
|
36
|
-
clearSent: (payload: string[]) => void;
|
|
37
|
-
/**
|
|
38
|
-
* Copy current buffer items to a new buffer.
|
|
39
|
-
* if canUseSessionStorage is undefined, it will set to false.
|
|
40
|
-
* if newLogger and newConfig are undefined, current logger and empty config will be used.
|
|
41
|
-
* if canUseSessionStorage is set to true, new SessionStorageSendBuffer will be returned otherwise ArraySendBuffer will be returned.
|
|
42
|
-
*/
|
|
43
|
-
createNew: (newLogger?: IDiagnosticLogger, newConfig?: ISenderConfig, canUseSessionStorage?: boolean) => ArraySendBuffer | SessionStorageSendBuffer;
|
|
44
|
-
}
|
|
45
|
-
declare abstract class BaseSendBuffer {
|
|
46
|
-
protected _get: () => string[];
|
|
47
|
-
protected _set: (buffer: string[]) => string[];
|
|
48
|
-
constructor(logger: IDiagnosticLogger, config: ISenderConfig);
|
|
49
|
-
enqueue(payload: string): void;
|
|
50
|
-
count(): number;
|
|
51
|
-
size(): number;
|
|
52
|
-
clear(): void;
|
|
53
|
-
getItems(): string[];
|
|
54
|
-
batchPayloads(payload: string[]): string;
|
|
55
|
-
createNew(newLogger?: IDiagnosticLogger, newConfig?: ISenderConfig, canUseSessionStorage?: boolean): ArraySendBuffer | SessionStorageSendBuffer;
|
|
56
|
-
}
|
|
57
|
-
export declare class ArraySendBuffer extends BaseSendBuffer implements ISendBuffer {
|
|
58
|
-
constructor(logger: IDiagnosticLogger, config: ISenderConfig);
|
|
59
|
-
markAsSent(payload: string[]): void;
|
|
60
|
-
clearSent(payload: string[]): void;
|
|
61
|
-
}
|
|
62
|
-
export declare class SessionStorageSendBuffer extends BaseSendBuffer implements ISendBuffer {
|
|
63
|
-
static BUFFER_KEY: string;
|
|
64
|
-
static SENT_BUFFER_KEY: string;
|
|
65
|
-
static MAX_BUFFER_SIZE: number;
|
|
66
|
-
constructor(logger: IDiagnosticLogger, config: ISenderConfig);
|
|
67
|
-
enqueue(payload: string): void;
|
|
68
|
-
clear(): void;
|
|
69
|
-
markAsSent(payload: string[]): void;
|
|
70
|
-
clearSent(payload: string[]): void;
|
|
71
|
-
createNew(newLogger?: IDiagnosticLogger, newConfig?: ISenderConfig, canUseSessionStorage?: boolean): ArraySendBuffer | SessionStorageSendBuffer;
|
|
72
|
-
}
|
|
73
|
-
export {};
|
package/types/Sender.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { IConfig, IEnvelope, ISample } from "@microsoft/applicationinsights-common";
|
|
2
|
-
import { BaseTelemetryPlugin, IAppInsightsCore, IChannelControls, IConfiguration, IDiagnosticLogger, IPlugin, IProcessTelemetryContext, ITelemetryItem, ITelemetryPluginChain, SendRequestReason } from "@microsoft/applicationinsights-core-js";
|
|
3
|
-
import { IBackendResponse, ISenderConfig, XDomainRequest as IXDomainRequest } from "./Interfaces";
|
|
4
|
-
import { ISendBuffer } from "./SendBuffer";
|
|
5
|
-
export type SenderFunction = (payload: string[], isAsync: boolean) => void;
|
|
6
|
-
export declare class Sender extends BaseTelemetryPlugin implements IChannelControls {
|
|
7
|
-
static constructEnvelope(orig: ITelemetryItem, iKey: string, logger: IDiagnosticLogger, convertUndefined?: any): IEnvelope;
|
|
8
|
-
readonly priority: number;
|
|
9
|
-
readonly identifier: string;
|
|
10
|
-
/**
|
|
11
|
-
* The configuration for this sender instance
|
|
12
|
-
*/
|
|
13
|
-
readonly _senderConfig: ISenderConfig;
|
|
14
|
-
/**
|
|
15
|
-
* A method which will cause data to be send to the url
|
|
16
|
-
*/
|
|
17
|
-
_sender: SenderFunction;
|
|
18
|
-
/**
|
|
19
|
-
* A send buffer object
|
|
20
|
-
*/
|
|
21
|
-
_buffer: ISendBuffer;
|
|
22
|
-
/**
|
|
23
|
-
* AppId of this component parsed from some backend response.
|
|
24
|
-
*/
|
|
25
|
-
_appId: string;
|
|
26
|
-
protected _sample: ISample;
|
|
27
|
-
constructor();
|
|
28
|
-
/**
|
|
29
|
-
* Pause the sending (transmission) of events, this will cause all events to be batched only until the maximum limits are
|
|
30
|
-
* hit at which point new events are dropped. Will also cause events to NOT be sent during page unload, so if Session storage
|
|
31
|
-
* is disabled events will be lost.
|
|
32
|
-
* SessionStorage Limit is 2000 events, In-Memory (Array) Storage is 10,000 events (can be configured via the eventsLimitInMem).
|
|
33
|
-
*/
|
|
34
|
-
pause(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Resume the sending (transmission) of events, this will restart the timer and any batched events will be sent using the normal
|
|
37
|
-
* send interval.
|
|
38
|
-
*/
|
|
39
|
-
resume(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Flush the batched events immediately (not synchronously).
|
|
42
|
-
* Will not flush if the Sender has been paused.
|
|
43
|
-
*/
|
|
44
|
-
flush(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Flush the batched events synchronously (if possible -- based on configuration).
|
|
47
|
-
* Will not flush if the Send has been paused.
|
|
48
|
-
*/
|
|
49
|
-
onunloadFlush(): void;
|
|
50
|
-
initialize(config: IConfiguration & IConfig, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
|
|
51
|
-
processTelemetry(telemetryItem: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
52
|
-
/**
|
|
53
|
-
* xhr state changes
|
|
54
|
-
*/
|
|
55
|
-
_xhrReadyStateChange(xhr: XMLHttpRequest, payload: string[], countOfItemsInPayload: number): void;
|
|
56
|
-
/**
|
|
57
|
-
* Immediately send buffered data
|
|
58
|
-
* @param async - {boolean} - Indicates if the events should be sent asynchronously
|
|
59
|
-
* @param forcedSender - {SenderFunction} - Indicates the forcedSender, undefined if not passed
|
|
60
|
-
*/
|
|
61
|
-
triggerSend(async?: boolean, forcedSender?: SenderFunction, sendReason?: SendRequestReason): void;
|
|
62
|
-
/**
|
|
63
|
-
* error handler
|
|
64
|
-
*/
|
|
65
|
-
_onError(payload: string[], message: string, event?: ErrorEvent): void;
|
|
66
|
-
/**
|
|
67
|
-
* partial success handler
|
|
68
|
-
*/
|
|
69
|
-
_onPartialSuccess(payload: string[], results: IBackendResponse): void;
|
|
70
|
-
/**
|
|
71
|
-
* success handler
|
|
72
|
-
*/
|
|
73
|
-
_onSuccess(payload: string[], countOfItemsInPayload: number): void;
|
|
74
|
-
/**
|
|
75
|
-
* xdr state changes
|
|
76
|
-
*/
|
|
77
|
-
_xdrOnLoad(xdr: IXDomainRequest, payload: string[]): void;
|
|
78
|
-
/**
|
|
79
|
-
* Add header to request
|
|
80
|
-
* @param name - Header name.
|
|
81
|
-
* @param value - Header value.
|
|
82
|
-
*/
|
|
83
|
-
addHeader(name: string, value: string): void;
|
|
84
|
-
}
|
package/types/Serializer.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IDiagnosticLogger } from "@microsoft/applicationinsights-core-js";
|
|
2
|
-
import { ISerializable } from "@microsoft/applicationinsights-common";
|
|
3
|
-
export declare class Serializer {
|
|
4
|
-
constructor(logger: IDiagnosticLogger);
|
|
5
|
-
/**
|
|
6
|
-
* Serializes the current object to a JSON string.
|
|
7
|
-
*/
|
|
8
|
-
serialize(input: ISerializable): string;
|
|
9
|
-
}
|