@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Common JavaScript Library, 3.0.0-beta.
|
|
2
|
+
* Microsoft Application Insights Common JavaScript Library, 3.0.0-beta.2211-01
|
|
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';
|
|
@@ -1961,6 +1963,110 @@ export declare interface ITelemetryTrace {
|
|
|
1961
1963
|
name?: string;
|
|
1962
1964
|
}
|
|
1963
1965
|
|
|
1966
|
+
/**
|
|
1967
|
+
* Identifies frequency of items sent
|
|
1968
|
+
* Default: send data on 28th every 3 month each year
|
|
1969
|
+
*/
|
|
1970
|
+
export declare interface IThrottleInterval {
|
|
1971
|
+
/**
|
|
1972
|
+
* Identifies month interval that items can be sent
|
|
1973
|
+
* 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.)
|
|
1974
|
+
* Default: 3
|
|
1975
|
+
*/
|
|
1976
|
+
monthInterval?: number;
|
|
1977
|
+
/**
|
|
1978
|
+
* Identifies days that items can be sent within a month
|
|
1979
|
+
* Default: 28
|
|
1980
|
+
*/
|
|
1981
|
+
dayInterval?: number;
|
|
1982
|
+
/**
|
|
1983
|
+
* Identifies max times items can be sent within a month
|
|
1984
|
+
* Default: 1
|
|
1985
|
+
*/
|
|
1986
|
+
maxTimesPerMonth?: number;
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
/**
|
|
1990
|
+
* Identifies limit number/percentage of items sent per time
|
|
1991
|
+
* If both are provided, minimum number between the two will be used
|
|
1992
|
+
*/
|
|
1993
|
+
export declare interface IThrottleLimit {
|
|
1994
|
+
/**
|
|
1995
|
+
* Identifies sampling percentage of items per time
|
|
1996
|
+
* The percentage is set to 4 decimal places, for example: 1 means 0.0001%
|
|
1997
|
+
* Default: 100 (0.01%)
|
|
1998
|
+
*/
|
|
1999
|
+
samplingRate?: number;
|
|
2000
|
+
/**
|
|
2001
|
+
* Identifies limit number of items per time
|
|
2002
|
+
* Default: 1
|
|
2003
|
+
*/
|
|
2004
|
+
maxSendNumber?: number;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* Identifies object for local storage
|
|
2009
|
+
*/
|
|
2010
|
+
export declare interface IThrottleLocalStorageObj {
|
|
2011
|
+
/**
|
|
2012
|
+
* Identifies start date
|
|
2013
|
+
*/
|
|
2014
|
+
date: Date;
|
|
2015
|
+
/**
|
|
2016
|
+
* Identifies current count
|
|
2017
|
+
*/
|
|
2018
|
+
count: number;
|
|
2019
|
+
/**
|
|
2020
|
+
* identifies previous triggered throttle date
|
|
2021
|
+
*/
|
|
2022
|
+
preTriggerDate?: Date;
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
/**
|
|
2026
|
+
* Identifies basic config
|
|
2027
|
+
*/
|
|
2028
|
+
export declare interface IThrottleMgrConfig {
|
|
2029
|
+
/**
|
|
2030
|
+
* Identifies message key to be used for local storage key
|
|
2031
|
+
*/
|
|
2032
|
+
msgKey: IThrottleMsgKey;
|
|
2033
|
+
/**
|
|
2034
|
+
* Identifies if throttle is disabled
|
|
2035
|
+
* Default: false
|
|
2036
|
+
*/
|
|
2037
|
+
disabled?: boolean;
|
|
2038
|
+
/**
|
|
2039
|
+
* Identifies limit number/percentage of items sent per time
|
|
2040
|
+
*/
|
|
2041
|
+
limit?: IThrottleLimit;
|
|
2042
|
+
/**
|
|
2043
|
+
* Identifies frequency of items sent
|
|
2044
|
+
* Default: send data on 28th every 3 month each year
|
|
2045
|
+
*/
|
|
2046
|
+
interval?: IThrottleInterval;
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
export declare const enum IThrottleMsgKey {
|
|
2050
|
+
default = 0,
|
|
2051
|
+
ikeyDeprecate = 1,
|
|
2052
|
+
cdnDeprecate = 2
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
/**
|
|
2056
|
+
* Identifies throttle result
|
|
2057
|
+
*/
|
|
2058
|
+
export declare interface IThrottleResult {
|
|
2059
|
+
/**
|
|
2060
|
+
* Identifies if items are sent
|
|
2061
|
+
*/
|
|
2062
|
+
isThrottled: boolean;
|
|
2063
|
+
/**
|
|
2064
|
+
* Identifies numbers of items are sent
|
|
2065
|
+
* if isThrottled is false, it will be set to 0
|
|
2066
|
+
*/
|
|
2067
|
+
throttleNum: number;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
1964
2070
|
export { ITraceParent }
|
|
1965
2071
|
|
|
1966
2072
|
export declare interface ITraceState {
|
|
@@ -2351,6 +2457,17 @@ export declare class TelemetryItemCreator {
|
|
|
2351
2457
|
static create: typeof createTelemetryItem;
|
|
2352
2458
|
}
|
|
2353
2459
|
|
|
2460
|
+
export declare class ThrottleMgr {
|
|
2461
|
+
canThrottle: () => boolean;
|
|
2462
|
+
sendMessage: (msgID: _eInternalMessageId, message: string, severity?: eLoggingSeverity) => IThrottleResult | null;
|
|
2463
|
+
getConfig: () => IThrottleMgrConfig;
|
|
2464
|
+
isTriggered: () => boolean;
|
|
2465
|
+
isReady: () => boolean;
|
|
2466
|
+
onReadyState: (isReady?: boolean) => boolean;
|
|
2467
|
+
flush: () => boolean;
|
|
2468
|
+
constructor(throttleMgr?: IThrottleMgrConfig, core?: IAppInsightsCore, namePrefix?: string);
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2354
2471
|
export declare class Trace implements IMessageData, ISerializable {
|
|
2355
2472
|
static envelopeType: string;
|
|
2356
2473
|
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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Common, 3.0.0-beta.
|
|
2
|
+
* Application Insights JavaScript SDK - Common, 3.0.0-beta.2211-01
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import { ContextTagKeys } from "./Contracts/ContextTagKeys";
|