@microsoft/applicationinsights-common 3.0.0-beta.2210-19 → 3.0.0-beta.2211-01
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 +399 -174
- 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 +2049 -1177
- package/dist/applicationinsights-common.api.md +65 -0
- package/dist/applicationinsights-common.d.ts +118 -1
- package/dist/applicationinsights-common.js +399 -174
- 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 +118 -1
- 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/IThrottleMgr.js +6 -0
- package/dist-esm/Interfaces/IThrottleMgr.js.map +1 -0
- package/dist-esm/Interfaces/ITraceTelemetry.js +1 -1
- package/dist-esm/Interfaces/PartAExtensions.js +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 +1 -1
- package/dist-esm/Telemetry/Common/DataPoint.js +1 -1
- package/dist-esm/Telemetry/Common/DataSanitizer.js +1 -1
- package/dist-esm/Telemetry/Common/Envelope.js +1 -1
- package/dist-esm/Telemetry/Event.js +1 -1
- package/dist-esm/Telemetry/Exception.js +4 -4
- package/dist-esm/Telemetry/Exception.js.map +1 -1
- package/dist-esm/Telemetry/Metric.js +3 -3
- package/dist-esm/Telemetry/Metric.js.map +1 -1
- package/dist-esm/Telemetry/PageView.js +1 -1
- package/dist-esm/Telemetry/PageViewPerformance.js +1 -1
- package/dist-esm/Telemetry/RemoteDependencyData.js +1 -1
- package/dist-esm/Telemetry/Trace.js +1 -1
- package/dist-esm/TelemetryItemCreator.js +1 -1
- package/dist-esm/ThrottleMgr.js +259 -0
- package/dist-esm/ThrottleMgr.js.map +1 -0
- package/dist-esm/UrlHelperFuncs.js +1 -1
- package/dist-esm/Util.js +4 -4
- package/dist-esm/Util.js.map +1 -1
- package/dist-esm/__DynamicConstants.js +16 -10
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-common.js +2 -1
- package/dist-esm/applicationinsights-common.js.map +1 -1
- package/package.json +5 -4
- package/src/Enums.ts +6 -0
- package/src/Interfaces/IThrottleMgr.ts +109 -0
- package/src/ThrottleMgr.ts +285 -0
- package/src/__DynamicConstants.ts +15 -9
- package/src/applicationinsights-common.ts +3 -1
- package/types/Enums.d.ts +5 -0
- package/types/Interfaces/IThrottleMgr.d.ts +94 -0
- package/types/ThrottleMgr.d.ts +12 -0
- package/types/__DynamicConstants.d.ts +13 -7
- package/types/applicationinsights-common.d.ts +3 -1
- package/types/tsdoc-metadata.json +1 -1
|
@@ -5,6 +5,7 @@ export {
|
|
|
5
5
|
correlationIdGetCorrelationContextValue, dateTimeUtilsNow, dateTimeUtilsDuration, isInternalApplicationInsightsEndpoint,
|
|
6
6
|
createDistributedTraceContextFromTrace
|
|
7
7
|
} from "./Util";
|
|
8
|
+
export { ThrottleMgr } from "./ThrottleMgr";
|
|
8
9
|
export { parseConnectionString, ConnectionStringParser } from "./ConnectionStringParser";
|
|
9
10
|
export { FieldType } from "./Enums";
|
|
10
11
|
export { IRequestHeaders, RequestHeaders, eRequestHeaders } from "./RequestResponseHeaders";
|
|
@@ -57,7 +58,8 @@ export { IPropertiesPlugin } from "./Interfaces/IPropertiesPlugin";
|
|
|
57
58
|
export { IUser, IUserContext } from "./Interfaces/Context/IUser";
|
|
58
59
|
export { ITelemetryTrace, ITraceState } from "./Interfaces/Context/ITelemetryTrace";
|
|
59
60
|
export { IRequestContext } from "./Interfaces/IRequestContext";
|
|
60
|
-
export {
|
|
61
|
+
export { IThrottleLocalStorageObj, IThrottleMgrConfig, IThrottleResult, IThrottleLimit, IThrottleInterval } from "./Interfaces/IThrottleMgr";
|
|
62
|
+
export { eDistributedTracingModes, DistributedTracingModes, IThrottleMsgKey } from "./Enums";
|
|
61
63
|
export { stringToBoolOrDefault, msToTimeSpan, getExtensionByName, isCrossOriginError } from "./HelperFuncs";
|
|
62
64
|
export {
|
|
63
65
|
isBeaconsSupported as isBeaconApiSupported,
|
package/types/Enums.d.ts
CHANGED
|
@@ -33,3 +33,8 @@ export declare const enum eDistributedTracingModes {
|
|
|
33
33
|
}
|
|
34
34
|
export declare const DistributedTracingModes: import("@microsoft/applicationinsights-core-js").EnumValue<typeof eDistributedTracingModes>;
|
|
35
35
|
export declare type DistributedTracingModes = number | eDistributedTracingModes;
|
|
36
|
+
export declare const enum IThrottleMsgKey {
|
|
37
|
+
default = 0,
|
|
38
|
+
ikeyDeprecate = 1,
|
|
39
|
+
cdnDeprecate = 2
|
|
40
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { IThrottleMsgKey } from "../Enums";
|
|
2
|
+
/**
|
|
3
|
+
* Identifies limit number/percentage of items sent per time
|
|
4
|
+
* If both are provided, minimum number between the two will be used
|
|
5
|
+
*/
|
|
6
|
+
export interface IThrottleLimit {
|
|
7
|
+
/**
|
|
8
|
+
* Identifies sampling percentage of items per time
|
|
9
|
+
* The percentage is set to 4 decimal places, for example: 1 means 0.0001%
|
|
10
|
+
* Default: 100 (0.01%)
|
|
11
|
+
*/
|
|
12
|
+
samplingRate?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Identifies limit number of items per time
|
|
15
|
+
* Default: 1
|
|
16
|
+
*/
|
|
17
|
+
maxSendNumber?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Identifies frequency of items sent
|
|
21
|
+
* Default: send data on 28th every 3 month each year
|
|
22
|
+
*/
|
|
23
|
+
export interface IThrottleInterval {
|
|
24
|
+
/**
|
|
25
|
+
* Identifies month interval that items can be sent
|
|
26
|
+
* For example, if it is set to 2 and start date is in Jan, items will be sent out every two months (Jan, March, May etc.)
|
|
27
|
+
* Default: 3
|
|
28
|
+
*/
|
|
29
|
+
monthInterval?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Identifies days that items can be sent within a month
|
|
32
|
+
* Default: 28
|
|
33
|
+
*/
|
|
34
|
+
dayInterval?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Identifies max times items can be sent within a month
|
|
37
|
+
* Default: 1
|
|
38
|
+
*/
|
|
39
|
+
maxTimesPerMonth?: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Identifies basic config
|
|
43
|
+
*/
|
|
44
|
+
export interface IThrottleMgrConfig {
|
|
45
|
+
/**
|
|
46
|
+
* Identifies message key to be used for local storage key
|
|
47
|
+
*/
|
|
48
|
+
msgKey: IThrottleMsgKey;
|
|
49
|
+
/**
|
|
50
|
+
* Identifies if throttle is disabled
|
|
51
|
+
* Default: false
|
|
52
|
+
*/
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Identifies limit number/percentage of items sent per time
|
|
56
|
+
*/
|
|
57
|
+
limit?: IThrottleLimit;
|
|
58
|
+
/**
|
|
59
|
+
* Identifies frequency of items sent
|
|
60
|
+
* Default: send data on 28th every 3 month each year
|
|
61
|
+
*/
|
|
62
|
+
interval?: IThrottleInterval;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Identifies object for local storage
|
|
66
|
+
*/
|
|
67
|
+
export interface IThrottleLocalStorageObj {
|
|
68
|
+
/**
|
|
69
|
+
* Identifies start date
|
|
70
|
+
*/
|
|
71
|
+
date: Date;
|
|
72
|
+
/**
|
|
73
|
+
* Identifies current count
|
|
74
|
+
*/
|
|
75
|
+
count: number;
|
|
76
|
+
/**
|
|
77
|
+
* identifies previous triggered throttle date
|
|
78
|
+
*/
|
|
79
|
+
preTriggerDate?: Date;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Identifies throttle result
|
|
83
|
+
*/
|
|
84
|
+
export interface IThrottleResult {
|
|
85
|
+
/**
|
|
86
|
+
* Identifies if items are sent
|
|
87
|
+
*/
|
|
88
|
+
isThrottled: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Identifies numbers of items are sent
|
|
91
|
+
* if isThrottled is false, it will be set to 0
|
|
92
|
+
*/
|
|
93
|
+
throttleNum: number;
|
|
94
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IAppInsightsCore, _eInternalMessageId, eLoggingSeverity } from "@microsoft/applicationinsights-core-js";
|
|
2
|
+
import { IThrottleMgrConfig, IThrottleResult } from "./Interfaces/IThrottleMgr";
|
|
3
|
+
export declare class ThrottleMgr {
|
|
4
|
+
canThrottle: () => boolean;
|
|
5
|
+
sendMessage: (msgID: _eInternalMessageId, message: string, severity?: eLoggingSeverity) => IThrottleResult | null;
|
|
6
|
+
getConfig: () => IThrottleMgrConfig;
|
|
7
|
+
isTriggered: () => boolean;
|
|
8
|
+
isReady: () => boolean;
|
|
9
|
+
onReadyState: (isReady?: boolean) => boolean;
|
|
10
|
+
flush: () => boolean;
|
|
11
|
+
constructor(throttleMgr?: IThrottleMgrConfig, core?: IAppInsightsCore, namePrefix?: string);
|
|
12
|
+
}
|
|
@@ -3,29 +3,35 @@ export declare const _DYN_LENGTH = "length";
|
|
|
3
3
|
export declare const _DYN_TO_LOWER_CASE = "toLowerCase";
|
|
4
4
|
export declare const _DYN_INGESTIONENDPOINT = "ingestionendpoint";
|
|
5
5
|
export declare const _DYN_TO_STRING = "toString";
|
|
6
|
-
export declare const _DYN_REMOVE_ITEM = "removeItem";
|
|
7
|
-
export declare const _DYN_NAME = "name";
|
|
8
|
-
export declare const _DYN_PATHNAME = "pathname";
|
|
9
|
-
export declare const _DYN_CORRELATION_HEADER_E0 = "correlationHeaderExcludePatterns";
|
|
10
6
|
export declare const _DYN_EXTENSION_CONFIG = "extensionConfig";
|
|
11
7
|
export declare const _DYN_EXCEPTIONS = "exceptions";
|
|
12
8
|
export declare const _DYN_PARSED_STACK = "parsedStack";
|
|
9
|
+
export declare const _DYN_REMOVE_ITEM = "removeItem";
|
|
10
|
+
export declare const _DYN_SUBSTRING = "substring";
|
|
11
|
+
export declare const _DYN_STRINGIFY = "stringify";
|
|
12
|
+
export declare const _DYN_NAME = "name";
|
|
13
13
|
export declare const _DYN_PROPERTIES = "properties";
|
|
14
14
|
export declare const _DYN_MEASUREMENTS = "measurements";
|
|
15
|
-
export declare const _DYN_STRINGIFY = "stringify";
|
|
16
15
|
export declare const _DYN_MESSAGE = "message";
|
|
17
16
|
export declare const _DYN_SIZE_IN_BYTES = "sizeInBytes";
|
|
18
17
|
export declare const _DYN_TYPE_NAME = "typeName";
|
|
19
18
|
export declare const _DYN_SEVERITY_LEVEL = "severityLevel";
|
|
20
19
|
export declare const _DYN_PROBLEM_GROUP = "problemGroup";
|
|
21
20
|
export declare const _DYN_IS_MANUAL = "isManual";
|
|
22
|
-
export declare const
|
|
21
|
+
export declare const _DYN__CREATE_FROM_INTERFA0 = "CreateFromInterface";
|
|
23
22
|
export declare const _DYN_HAS_FULL_STACK = "hasFullStack";
|
|
24
23
|
export declare const _DYN_LEVEL = "level";
|
|
25
24
|
export declare const _DYN_METHOD = "method";
|
|
26
25
|
export declare const _DYN_ASSEMBLY = "assembly";
|
|
27
26
|
export declare const _DYN_FILE_NAME = "fileName";
|
|
28
27
|
export declare const _DYN_LINE = "line";
|
|
28
|
+
export declare const _DYN_COUNT = "count";
|
|
29
29
|
export declare const _DYN_DURATION = "duration";
|
|
30
30
|
export declare const _DYN_RECEIVED_RESPONSE = "receivedResponse";
|
|
31
|
-
export declare const
|
|
31
|
+
export declare const _DYN_PRE_TRIGGER_DATE = "preTriggerDate";
|
|
32
|
+
export declare const _DYN_DISABLED = "disabled";
|
|
33
|
+
export declare const _DYN_DATE = "date";
|
|
34
|
+
export declare const _DYN_GET_UTCDATE = "getUTCDate";
|
|
35
|
+
export declare const _DYN_MAX_TIMES_PER_MONTH = "maxTimesPerMonth";
|
|
36
|
+
export declare const _DYN_PATHNAME = "pathname";
|
|
37
|
+
export declare const _DYN_CORRELATION_HEADER_E1 = "correlationHeaderExcludePatterns";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { correlationIdSetPrefix, correlationIdGetPrefix, correlationIdCanIncludeCorrelationHeader, correlationIdGetCorrelationContext, correlationIdGetCorrelationContextValue, dateTimeUtilsNow, dateTimeUtilsDuration, isInternalApplicationInsightsEndpoint, createDistributedTraceContextFromTrace } from "./Util";
|
|
2
|
+
export { ThrottleMgr } from "./ThrottleMgr";
|
|
2
3
|
export { parseConnectionString, ConnectionStringParser } from "./ConnectionStringParser";
|
|
3
4
|
export { FieldType } from "./Enums";
|
|
4
5
|
export { IRequestHeaders, RequestHeaders, eRequestHeaders } from "./RequestResponseHeaders";
|
|
@@ -46,7 +47,8 @@ export { IPropertiesPlugin } from "./Interfaces/IPropertiesPlugin";
|
|
|
46
47
|
export { IUser, IUserContext } from "./Interfaces/Context/IUser";
|
|
47
48
|
export { ITelemetryTrace, ITraceState } from "./Interfaces/Context/ITelemetryTrace";
|
|
48
49
|
export { IRequestContext } from "./Interfaces/IRequestContext";
|
|
49
|
-
export {
|
|
50
|
+
export { IThrottleLocalStorageObj, IThrottleMgrConfig, IThrottleResult, IThrottleLimit, IThrottleInterval } from "./Interfaces/IThrottleMgr";
|
|
51
|
+
export { eDistributedTracingModes, DistributedTracingModes, IThrottleMsgKey } from "./Enums";
|
|
50
52
|
export { stringToBoolOrDefault, msToTimeSpan, getExtensionByName, isCrossOriginError } from "./HelperFuncs";
|
|
51
53
|
export { isBeaconsSupported as isBeaconApiSupported, ITraceParent, createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from "@microsoft/applicationinsights-core-js";
|
|
52
54
|
export { createDomEvent } from "./DomHelperFuncs";
|