@microsoft/applicationinsights-common 2.8.9-nightly.2210-05 → 2.8.9
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 +223 -5
- 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 +2736 -1864
- package/dist/applicationinsights-common.api.md +65 -0
- package/dist/applicationinsights-common.d.ts +118 -1
- package/dist/applicationinsights-common.js +223 -5
- 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 +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 +1 -1
- package/dist-esm/__DynamicConstants.js +10 -4
- 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 +58 -60
- package/src/Enums.ts +6 -0
- package/src/Interfaces/IThrottleMgr.ts +109 -0
- package/src/ThrottleMgr.ts +285 -0
- package/src/__DynamicConstants.ts +9 -3
- 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 +8 -2
- package/types/applicationinsights-common.d.ts +3 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Common JavaScript Library, 2.8.9
|
|
2
|
+
* Microsoft Application Insights Common JavaScript Library, 2.8.9
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -15,9 +15,11 @@
|
|
|
15
15
|
|
|
16
16
|
import { createTraceParent } from '@microsoft/applicationinsights-core-js';
|
|
17
17
|
import { _eInternalMessageId } from '@microsoft/applicationinsights-core-js';
|
|
18
|
+
import { eLoggingSeverity } from '@microsoft/applicationinsights-core-js';
|
|
18
19
|
import { EnumValue } from '@microsoft/applicationinsights-core-js';
|
|
19
20
|
import { findW3cTraceParent } from '@microsoft/applicationinsights-core-js';
|
|
20
21
|
import { formatTraceParent } from '@microsoft/applicationinsights-core-js';
|
|
22
|
+
import { IAppInsightsCore } from '@microsoft/applicationinsights-core-js';
|
|
21
23
|
import { IChannelControls } from '@microsoft/applicationinsights-core-js';
|
|
22
24
|
import { IConfiguration } from '@microsoft/applicationinsights-core-js';
|
|
23
25
|
import { ICookieMgr } from '@microsoft/applicationinsights-core-js';
|
|
@@ -2035,6 +2037,110 @@ export declare interface ITelemetryTrace {
|
|
|
2035
2037
|
name?: string;
|
|
2036
2038
|
}
|
|
2037
2039
|
|
|
2040
|
+
/**
|
|
2041
|
+
* Identifies frequency of items sent
|
|
2042
|
+
* Default: send data on 28th every 3 month each year
|
|
2043
|
+
*/
|
|
2044
|
+
export declare interface IThrottleInterval {
|
|
2045
|
+
/**
|
|
2046
|
+
* Identifies month interval that items can be sent
|
|
2047
|
+
* 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.)
|
|
2048
|
+
* Default: 3
|
|
2049
|
+
*/
|
|
2050
|
+
monthInterval?: number;
|
|
2051
|
+
/**
|
|
2052
|
+
* Identifies days that items can be sent within a month
|
|
2053
|
+
* Default: 28
|
|
2054
|
+
*/
|
|
2055
|
+
dayInterval?: number;
|
|
2056
|
+
/**
|
|
2057
|
+
* Identifies max times items can be sent within a month
|
|
2058
|
+
* Default: 1
|
|
2059
|
+
*/
|
|
2060
|
+
maxTimesPerMonth?: number;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
/**
|
|
2064
|
+
* Identifies limit number/percentage of items sent per time
|
|
2065
|
+
* If both are provided, minimum number between the two will be used
|
|
2066
|
+
*/
|
|
2067
|
+
export declare interface IThrottleLimit {
|
|
2068
|
+
/**
|
|
2069
|
+
* Identifies sampling percentage of items per time
|
|
2070
|
+
* The percentage is set to 4 decimal places, for example: 1 means 0.0001%
|
|
2071
|
+
* Default: 100 (0.01%)
|
|
2072
|
+
*/
|
|
2073
|
+
samplingRate?: number;
|
|
2074
|
+
/**
|
|
2075
|
+
* Identifies limit number of items per time
|
|
2076
|
+
* Default: 1
|
|
2077
|
+
*/
|
|
2078
|
+
maxSendNumber?: number;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
/**
|
|
2082
|
+
* Identifies object for local storage
|
|
2083
|
+
*/
|
|
2084
|
+
export declare interface IThrottleLocalStorageObj {
|
|
2085
|
+
/**
|
|
2086
|
+
* Identifies start date
|
|
2087
|
+
*/
|
|
2088
|
+
date: Date;
|
|
2089
|
+
/**
|
|
2090
|
+
* Identifies current count
|
|
2091
|
+
*/
|
|
2092
|
+
count: number;
|
|
2093
|
+
/**
|
|
2094
|
+
* identifies previous triggered throttle date
|
|
2095
|
+
*/
|
|
2096
|
+
preTriggerDate?: Date;
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
/**
|
|
2100
|
+
* Identifies basic config
|
|
2101
|
+
*/
|
|
2102
|
+
export declare interface IThrottleMgrConfig {
|
|
2103
|
+
/**
|
|
2104
|
+
* Identifies message key to be used for local storage key
|
|
2105
|
+
*/
|
|
2106
|
+
msgKey: IThrottleMsgKey;
|
|
2107
|
+
/**
|
|
2108
|
+
* Identifies if throttle is disabled
|
|
2109
|
+
* Default: false
|
|
2110
|
+
*/
|
|
2111
|
+
disabled?: boolean;
|
|
2112
|
+
/**
|
|
2113
|
+
* Identifies limit number/percentage of items sent per time
|
|
2114
|
+
*/
|
|
2115
|
+
limit?: IThrottleLimit;
|
|
2116
|
+
/**
|
|
2117
|
+
* Identifies frequency of items sent
|
|
2118
|
+
* Default: send data on 28th every 3 month each year
|
|
2119
|
+
*/
|
|
2120
|
+
interval?: IThrottleInterval;
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
export declare const enum IThrottleMsgKey {
|
|
2124
|
+
default = 0,
|
|
2125
|
+
ikeyDeprecate = 1,
|
|
2126
|
+
cdnDeprecate = 2
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
/**
|
|
2130
|
+
* Identifies throttle result
|
|
2131
|
+
*/
|
|
2132
|
+
export declare interface IThrottleResult {
|
|
2133
|
+
/**
|
|
2134
|
+
* Identifies if items are sent
|
|
2135
|
+
*/
|
|
2136
|
+
isThrottled: boolean;
|
|
2137
|
+
/**
|
|
2138
|
+
* Identifies numbers of items are sent
|
|
2139
|
+
* if isThrottled is false, it will be set to 0
|
|
2140
|
+
*/
|
|
2141
|
+
throttleNum: number;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2038
2144
|
export { ITraceParent }
|
|
2039
2145
|
|
|
2040
2146
|
export declare interface ITraceState {
|
|
@@ -2602,6 +2708,17 @@ export declare class TelemetryItemCreator {
|
|
|
2602
2708
|
static create: typeof createTelemetryItem;
|
|
2603
2709
|
}
|
|
2604
2710
|
|
|
2711
|
+
export declare class ThrottleMgr {
|
|
2712
|
+
canThrottle: () => boolean;
|
|
2713
|
+
sendMessage: (msgID: _eInternalMessageId, message: string, severity?: eLoggingSeverity) => IThrottleResult | null;
|
|
2714
|
+
getConfig: () => IThrottleMgrConfig;
|
|
2715
|
+
isTriggered: () => boolean;
|
|
2716
|
+
isReady: () => boolean;
|
|
2717
|
+
onReadyState: (isReady?: boolean) => boolean;
|
|
2718
|
+
flush: () => boolean;
|
|
2719
|
+
constructor(throttleMgr?: IThrottleMgrConfig, core?: IAppInsightsCore, namePrefix?: string);
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2605
2722
|
export declare class Trace implements IMessageData, ISerializable {
|
|
2606
2723
|
static envelopeType: string;
|
|
2607
2724
|
static dataType: string;
|
package/dist-esm/Constants.js
CHANGED
package/dist-esm/Enums.js
CHANGED
package/dist-esm/HelperFuncs.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IThrottleMgr.js.map","sources":["IThrottleMgr.js"],"sourcesContent":["export {};\r\n//# sourceMappingURL=IThrottleMgr.js.map"],"names":[],"mappings":";;;;AAAA;AACA"}
|