@microsoft/applicationinsights-channel-js 3.0.0-beta.2210-01 → 3.0.0-beta.2210-02
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 +946 -428
- 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 +1 -1
- package/dist/applicationinsights-channel-js.d.ts +22 -22
- package/dist/applicationinsights-channel-js.js +946 -428
- 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 +22 -22
- 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/InternalConstants.js +1 -1
- package/dist-esm/Offline.js +1 -1
- package/dist-esm/SendBuffer.js +9 -11
- package/dist-esm/SendBuffer.js.map +1 -1
- package/dist-esm/Sender.js +186 -135
- package/dist-esm/Sender.js.map +1 -1
- package/dist-esm/Serializer.js +2 -3
- package/dist-esm/Serializer.js.map +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/__DynamicConstants.js +11 -15
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-channel-js.js +1 -1
- package/package.json +4 -4
- package/src/Interfaces.ts +17 -17
- package/src/SendBuffer.ts +5 -5
- package/src/Sender.ts +194 -129
- package/src/__DynamicConstants.ts +10 -14
- package/types/Interfaces.d.ts +17 -17
- package/types/Sender.d.ts +4 -4
- package/types/__DynamicConstants.d.ts +5 -9
package/types/Interfaces.d.ts
CHANGED
|
@@ -2,68 +2,68 @@ export interface ISenderConfig {
|
|
|
2
2
|
/**
|
|
3
3
|
* The url to which payloads will be sent
|
|
4
4
|
*/
|
|
5
|
-
endpointUrl:
|
|
5
|
+
endpointUrl: string;
|
|
6
6
|
/**
|
|
7
7
|
* The JSON format (normal vs line delimited). True means line delimited JSON.
|
|
8
8
|
*/
|
|
9
|
-
emitLineDelimitedJson:
|
|
9
|
+
emitLineDelimitedJson: boolean;
|
|
10
10
|
/**
|
|
11
11
|
* The maximum size of a batch in bytes
|
|
12
12
|
*/
|
|
13
|
-
maxBatchSizeInBytes:
|
|
13
|
+
maxBatchSizeInBytes: number;
|
|
14
14
|
/**
|
|
15
15
|
* The maximum interval allowed between calls to batchInvoke
|
|
16
16
|
*/
|
|
17
|
-
maxBatchInterval:
|
|
17
|
+
maxBatchInterval: number;
|
|
18
18
|
/**
|
|
19
19
|
* The master off switch. Do not send any data if set to TRUE
|
|
20
20
|
*/
|
|
21
|
-
disableTelemetry:
|
|
21
|
+
disableTelemetry: boolean;
|
|
22
22
|
/**
|
|
23
23
|
* Store a copy of a send buffer in the session storage
|
|
24
24
|
*/
|
|
25
|
-
enableSessionStorageBuffer:
|
|
25
|
+
enableSessionStorageBuffer: boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Is retry handler disabled.
|
|
28
28
|
* If enabled, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error) and 503 (service unavailable).
|
|
29
29
|
*/
|
|
30
|
-
isRetryDisabled:
|
|
31
|
-
isBeaconApiDisabled:
|
|
30
|
+
isRetryDisabled: boolean;
|
|
31
|
+
isBeaconApiDisabled: boolean;
|
|
32
32
|
/**
|
|
33
33
|
* Don't use XMLHttpRequest or XDomainRequest (for IE < 9) by default instead attempt to use fetch() or sendBeacon.
|
|
34
34
|
* If no other transport is available it will still use XMLHttpRequest
|
|
35
35
|
*/
|
|
36
|
-
disableXhr:
|
|
36
|
+
disableXhr: boolean;
|
|
37
37
|
/**
|
|
38
38
|
* If fetch keepalive is supported do not use it for sending events during unload, it may still fallback to fetch() without keepalive
|
|
39
39
|
*/
|
|
40
|
-
onunloadDisableFetch:
|
|
40
|
+
onunloadDisableFetch: boolean;
|
|
41
41
|
/**
|
|
42
42
|
* Is beacon disabled on page unload.
|
|
43
43
|
* If enabled, flush events through beaconSender.
|
|
44
44
|
*/
|
|
45
|
-
onunloadDisableBeacon:
|
|
45
|
+
onunloadDisableBeacon: boolean;
|
|
46
46
|
/**
|
|
47
47
|
* (Optional) Override the instrumentation key that this channel instance sends to
|
|
48
48
|
*/
|
|
49
|
-
instrumentationKey:
|
|
50
|
-
namePrefix:
|
|
51
|
-
samplingPercentage:
|
|
49
|
+
instrumentationKey: string;
|
|
50
|
+
namePrefix: string;
|
|
51
|
+
samplingPercentage: number;
|
|
52
52
|
/**
|
|
53
53
|
* (Optional) The ability for the user to provide extra headers
|
|
54
54
|
*/
|
|
55
|
-
customHeaders:
|
|
55
|
+
customHeaders: [{
|
|
56
56
|
header: string;
|
|
57
57
|
value: string;
|
|
58
58
|
}];
|
|
59
59
|
/**
|
|
60
60
|
* (Optional) Provide user an option to convert undefined field to user defined value.
|
|
61
61
|
*/
|
|
62
|
-
convertUndefined:
|
|
62
|
+
convertUndefined: any;
|
|
63
63
|
/**
|
|
64
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
65
|
*/
|
|
66
|
-
eventsLimitInMem:
|
|
66
|
+
eventsLimitInMem: number;
|
|
67
67
|
}
|
|
68
68
|
export interface IBackendResponse {
|
|
69
69
|
/**
|
package/types/Sender.d.ts
CHANGED
|
@@ -55,8 +55,8 @@ export declare class Sender extends BaseTelemetryPlugin implements IChannelContr
|
|
|
55
55
|
_xhrReadyStateChange(xhr: XMLHttpRequest, payload: string[], countOfItemsInPayload: number): void;
|
|
56
56
|
/**
|
|
57
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
|
|
58
|
+
* @param async - {boolean} - Indicates if the events should be sent asynchronously
|
|
59
|
+
* @param forcedSender - {SenderFunction} - Indicates the forcedSender, undefined if not passed
|
|
60
60
|
*/
|
|
61
61
|
triggerSend(async?: boolean, forcedSender?: SenderFunction, sendReason?: SendRequestReason): void;
|
|
62
62
|
/**
|
|
@@ -77,8 +77,8 @@ export declare class Sender extends BaseTelemetryPlugin implements IChannelContr
|
|
|
77
77
|
_xdrOnLoad(xdr: IXDomainRequest, payload: string[]): void;
|
|
78
78
|
/**
|
|
79
79
|
* Add header to request
|
|
80
|
-
* @param name
|
|
81
|
-
* @param value
|
|
80
|
+
* @param name - Header name.
|
|
81
|
+
* @param value - Header value.
|
|
82
82
|
*/
|
|
83
83
|
addHeader(name: string, value: string): void;
|
|
84
84
|
}
|
|
@@ -12,6 +12,7 @@ export declare const _DYN_TO_STRING = "toString";
|
|
|
12
12
|
export declare const _DYN_ON_LINE = "onLine";
|
|
13
13
|
export declare const _DYN_ENQUEUE = "enqueue";
|
|
14
14
|
export declare const _DYN_COUNT = "count";
|
|
15
|
+
export declare const _DYN_EVENTS_LIMIT_IN_MEM = "eventsLimitInMem";
|
|
15
16
|
export declare const _DYN_PUSH = "push";
|
|
16
17
|
export declare const _DYN_EMIT_LINE_DELIMITED_0 = "emitLineDelimitedJson";
|
|
17
18
|
export declare const _DYN_CLEAR = "clear";
|
|
@@ -22,35 +23,30 @@ export declare const _DYN__BUFFER__KEY = "BUFFER_KEY";
|
|
|
22
23
|
export declare const _DYN__SENT__BUFFER__KEY = "SENT_BUFFER_KEY";
|
|
23
24
|
export declare const _DYN__MAX__BUFFER__SIZE = "MAX_BUFFER_SIZE";
|
|
24
25
|
export declare const _DYN_NAME_PREFIX = "namePrefix";
|
|
25
|
-
export declare const _DYN_MAX_BATCH_SIZE_IN_BY1 = "maxBatchSizeInBytes";
|
|
26
26
|
export declare const _DYN_TRIGGER_SEND = "triggerSend";
|
|
27
27
|
export declare const _DYN_DIAG_LOG = "diagLog";
|
|
28
|
+
export declare const _DYN__SENDER = "_sender";
|
|
29
|
+
export declare const _DYN_MAX_BATCH_SIZE_IN_BY1 = "maxBatchSizeInBytes";
|
|
28
30
|
export declare const _DYN_ONUNLOAD_DISABLE_BEA2 = "onunloadDisableBeacon";
|
|
29
31
|
export declare const _DYN_IS_BEACON_API_DISABL3 = "isBeaconApiDisabled";
|
|
30
|
-
export declare const _DYN__SENDER = "_sender";
|
|
31
|
-
export declare const _DYN__SENDER_CONFIG = "_senderConfig";
|
|
32
32
|
export declare const _DYN__BUFFER = "_buffer";
|
|
33
33
|
export declare const _DYN_ENABLE_SESSION_STORA4 = "enableSessionStorageBuffer";
|
|
34
34
|
export declare const _DYN_SAMPLING_PERCENTAGE = "samplingPercentage";
|
|
35
35
|
export declare const _DYN_INSTRUMENTATION_KEY = "instrumentationKey";
|
|
36
|
-
export declare const _DYN_ENDPOINT_URL = "endpointUrl";
|
|
37
36
|
export declare const _DYN_CUSTOM_HEADERS = "customHeaders";
|
|
38
37
|
export declare const _DYN_DISABLE_XHR = "disableXhr";
|
|
39
38
|
export declare const _DYN_ONUNLOAD_DISABLE_FET5 = "onunloadDisableFetch";
|
|
40
|
-
export declare const
|
|
39
|
+
export declare const _DYN_CONVERT_UNDEFINED = "convertUndefined";
|
|
40
|
+
export declare const _DYN_MAX_BATCH_INTERVAL = "maxBatchInterval";
|
|
41
41
|
export declare const _DYN_BASE_TYPE = "baseType";
|
|
42
42
|
export declare const _DYN_SAMPLE_RATE = "sampleRate";
|
|
43
|
-
export declare const _DYN_CONVERT_UNDEFINED = "convertUndefined";
|
|
44
43
|
export declare const _DYN__XHR_READY_STATE_CHA6 = "_xhrReadyStateChange";
|
|
45
44
|
export declare const _DYN__ON_ERROR = "_onError";
|
|
46
45
|
export declare const _DYN__ON_PARTIAL_SUCCESS = "_onPartialSuccess";
|
|
47
46
|
export declare const _DYN__ON_SUCCESS = "_onSuccess";
|
|
48
47
|
export declare const _DYN_ITEMS_ACCEPTED = "itemsAccepted";
|
|
49
48
|
export declare const _DYN_ITEMS_RECEIVED = "itemsReceived";
|
|
50
|
-
export declare const _DYN_IS_RETRY_DISABLED = "isRetryDisabled";
|
|
51
49
|
export declare const _DYN_SET_REQUEST_HEADER = "setRequestHeader";
|
|
52
|
-
export declare const _DYN_MAX_BATCH_INTERVAL = "maxBatchInterval";
|
|
53
50
|
export declare const _DYN_EVENTS_SEND_REQUEST = "eventsSendRequest";
|
|
54
|
-
export declare const _DYN_DISABLE_INSTRUMENTAT7 = "disableInstrumentationKeyValidation";
|
|
55
51
|
export declare const _DYN_GET_SAMPLING_SCORE = "getSamplingScore";
|
|
56
52
|
export declare const _DYN_GET_HASH_CODE_SCORE = "getHashCodeScore";
|