@microsoft/applicationinsights-core-js 2.8.0-nightly.2204-04 → 2.8.0-nightly.2204-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/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +313 -277
- package/browser/applicationinsights-core-js.js.map +1 -1
- package/browser/applicationinsights-core-js.min.js +2 -2
- package/browser/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.api.json +731 -36
- package/dist/applicationinsights-core-js.api.md +49 -98
- package/dist/applicationinsights-core-js.d.ts +96 -116
- package/dist/applicationinsights-core-js.js +313 -277
- package/dist/applicationinsights-core-js.js.map +1 -1
- package/dist/applicationinsights-core-js.min.js +2 -2
- package/dist/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.rollup.d.ts +96 -116
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +3 -5
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +3 -3
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +1 -1
- package/dist-esm/JavaScriptSDK/Constants.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +21 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +12 -21
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +51 -0
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js.map +1 -0
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +10 -9
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +2 -2
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
- package/dist-esm/applicationinsights-core-js.js +4 -3
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +1 -1
- package/src/JavaScriptSDK/AppInsightsCore.ts +3 -5
- package/src/JavaScriptSDK/BaseCore.ts +2 -2
- package/src/JavaScriptSDK/DataCacheHelper.ts +1 -1
- package/src/JavaScriptSDK/DiagnosticLogger.ts +22 -0
- package/src/JavaScriptSDK/HelperFuncs.ts +13 -22
- package/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts +56 -0
- package/src/JavaScriptSDK.Enums/EventsDiscardedReason.ts +48 -8
- package/src/JavaScriptSDK.Enums/LoggingEnums.ts +3 -4
- package/types/JavaScriptSDK/DiagnosticLogger.d.ts +13 -0
- package/types/JavaScriptSDK/HelperFuncs.d.ts +10 -6
- package/types/JavaScriptSDK.Enums/EnumHelperFuncs.d.ts +34 -0
- package/types/JavaScriptSDK.Enums/EventsDiscardedReason.d.ts +14 -9
- package/types/JavaScriptSDK.Enums/LoggingEnums.d.ts +2 -88
- package/types/applicationinsights-core-js.d.ts +4 -3
|
@@ -145,7 +145,14 @@ export function createClassFromInterface<T>(defaults?: T): new () => T;
|
|
|
145
145
|
export function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
146
146
|
|
|
147
147
|
// @public
|
|
148
|
-
export function
|
|
148
|
+
export function createEnumMap<E, I = keyof E>(values: {
|
|
149
|
+
[key in keyof E]: E[keyof E];
|
|
150
|
+
}): EnumMap<E, I>;
|
|
151
|
+
|
|
152
|
+
// @public
|
|
153
|
+
export function createEnumStyle<E>(values: {
|
|
154
|
+
[key in keyof E]: E[keyof E];
|
|
155
|
+
}): EnumValue<E>;
|
|
149
156
|
|
|
150
157
|
// @public
|
|
151
158
|
export function createProcessTelemetryContext(telemetryChain: ITelemetryPluginChain | null, config: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin): IProcessTelemetryContext;
|
|
@@ -159,9 +166,17 @@ export function createUnloadHandlerContainer(): {
|
|
|
159
166
|
run: (unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
160
167
|
};
|
|
161
168
|
|
|
169
|
+
// @public
|
|
170
|
+
export function createValueMap<E, V = E>(values: {
|
|
171
|
+
[key in keyof E]: [eValue: E[keyof E], mapValue: V[keyof V]];
|
|
172
|
+
}): V;
|
|
173
|
+
|
|
162
174
|
// @public
|
|
163
175
|
export function dateNow(): number;
|
|
164
176
|
|
|
177
|
+
// @public (undocumented)
|
|
178
|
+
export function deepFreeze<T>(obj: T): T;
|
|
179
|
+
|
|
165
180
|
// @public @deprecated (undocumented)
|
|
166
181
|
export function deleteCookie(logger: IDiagnosticLogger, name: string): boolean;
|
|
167
182
|
|
|
@@ -194,6 +209,16 @@ export function doPerf<T>(mgrSource: IPerfManagerProvider | IPerfManager, getSou
|
|
|
194
209
|
// @public
|
|
195
210
|
export function dumpObj(object: any): string;
|
|
196
211
|
|
|
212
|
+
// @public
|
|
213
|
+
export const enum eEventsDiscardedReason {
|
|
214
|
+
InvalidEvent = 2,
|
|
215
|
+
KillSwitch = 4,
|
|
216
|
+
NonRetryableStatus = 1,
|
|
217
|
+
QueueFull = 5,
|
|
218
|
+
SizeLimitExceeded = 3,
|
|
219
|
+
Unknown = 0
|
|
220
|
+
}
|
|
221
|
+
|
|
197
222
|
// @public (undocumented)
|
|
198
223
|
export const enum _eInternalMessageId {
|
|
199
224
|
// (undocumented)
|
|
@@ -368,6 +393,16 @@ export const enum eLoggingSeverity {
|
|
|
368
393
|
WARNING = 2
|
|
369
394
|
}
|
|
370
395
|
|
|
396
|
+
// @public (undocumented)
|
|
397
|
+
export type EnumMap<E = any, I = E> = {
|
|
398
|
+
readonly [key in keyof E extends string ? keyof E : never]: key extends string ? key : keyof E;
|
|
399
|
+
} & I;
|
|
400
|
+
|
|
401
|
+
// @public (undocumented)
|
|
402
|
+
export type EnumValue<E = any> = {
|
|
403
|
+
readonly [key in keyof E]: E[key];
|
|
404
|
+
};
|
|
405
|
+
|
|
371
406
|
// @public (undocumented)
|
|
372
407
|
export const EventHelper: IEventHelper;
|
|
373
408
|
|
|
@@ -378,14 +413,10 @@ export function eventOff<T>(target: T, eventName: string, handlerRef: any, evtNa
|
|
|
378
413
|
export function eventOn<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): boolean;
|
|
379
414
|
|
|
380
415
|
// @public
|
|
381
|
-
export const EventsDiscardedReason:
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
SizeLimitExceeded: number;
|
|
386
|
-
KillSwitch: number;
|
|
387
|
-
QueueFull: number;
|
|
388
|
-
};
|
|
416
|
+
export const EventsDiscardedReason: EnumValue<typeof eEventsDiscardedReason>;
|
|
417
|
+
|
|
418
|
+
// @public (undocumented)
|
|
419
|
+
export type EventsDiscardedReason = number | eEventsDiscardedReason;
|
|
389
420
|
|
|
390
421
|
// @public
|
|
391
422
|
export function generateW3CId(): string;
|
|
@@ -772,90 +803,7 @@ export class _InternalLogMessage {
|
|
|
772
803
|
}
|
|
773
804
|
|
|
774
805
|
// @public
|
|
775
|
-
export const _InternalMessageId:
|
|
776
|
-
BrowserDoesNotSupportLocalStorage: number;
|
|
777
|
-
BrowserCannotReadLocalStorage: number;
|
|
778
|
-
BrowserCannotReadSessionStorage: number;
|
|
779
|
-
BrowserCannotWriteLocalStorage: number;
|
|
780
|
-
BrowserCannotWriteSessionStorage: number;
|
|
781
|
-
BrowserFailedRemovalFromLocalStorage: number;
|
|
782
|
-
BrowserFailedRemovalFromSessionStorage: number;
|
|
783
|
-
CannotSendEmptyTelemetry: number;
|
|
784
|
-
ClientPerformanceMathError: number;
|
|
785
|
-
ErrorParsingAISessionCookie: number;
|
|
786
|
-
ErrorPVCalc: number;
|
|
787
|
-
ExceptionWhileLoggingError: number;
|
|
788
|
-
FailedAddingTelemetryToBuffer: number;
|
|
789
|
-
FailedMonitorAjaxAbort: number;
|
|
790
|
-
FailedMonitorAjaxDur: number;
|
|
791
|
-
FailedMonitorAjaxOpen: number;
|
|
792
|
-
FailedMonitorAjaxRSC: number;
|
|
793
|
-
FailedMonitorAjaxSend: number;
|
|
794
|
-
FailedMonitorAjaxGetCorrelationHeader: number;
|
|
795
|
-
FailedToAddHandlerForOnBeforeUnload: number;
|
|
796
|
-
FailedToSendQueuedTelemetry: number;
|
|
797
|
-
FailedToReportDataLoss: number;
|
|
798
|
-
FlushFailed: number;
|
|
799
|
-
MessageLimitPerPVExceeded: number;
|
|
800
|
-
MissingRequiredFieldSpecification: number;
|
|
801
|
-
NavigationTimingNotSupported: number;
|
|
802
|
-
OnError: number;
|
|
803
|
-
SessionRenewalDateIsZero: number;
|
|
804
|
-
SenderNotInitialized: number;
|
|
805
|
-
StartTrackEventFailed: number;
|
|
806
|
-
StopTrackEventFailed: number;
|
|
807
|
-
StartTrackFailed: number;
|
|
808
|
-
StopTrackFailed: number;
|
|
809
|
-
TelemetrySampledAndNotSent: number;
|
|
810
|
-
TrackEventFailed: number;
|
|
811
|
-
TrackExceptionFailed: number;
|
|
812
|
-
TrackMetricFailed: number;
|
|
813
|
-
TrackPVFailed: number;
|
|
814
|
-
TrackPVFailedCalc: number;
|
|
815
|
-
TrackTraceFailed: number;
|
|
816
|
-
TransmissionFailed: number;
|
|
817
|
-
FailedToSetStorageBuffer: number;
|
|
818
|
-
FailedToRestoreStorageBuffer: number;
|
|
819
|
-
InvalidBackendResponse: number;
|
|
820
|
-
FailedToFixDepricatedValues: number;
|
|
821
|
-
InvalidDurationValue: number;
|
|
822
|
-
TelemetryEnvelopeInvalid: number;
|
|
823
|
-
CreateEnvelopeError: number;
|
|
824
|
-
CannotSerializeObject: number;
|
|
825
|
-
CannotSerializeObjectNonSerializable: number;
|
|
826
|
-
CircularReferenceDetected: number;
|
|
827
|
-
ClearAuthContextFailed: number;
|
|
828
|
-
ExceptionTruncated: number;
|
|
829
|
-
IllegalCharsInName: number;
|
|
830
|
-
ItemNotInArray: number;
|
|
831
|
-
MaxAjaxPerPVExceeded: number;
|
|
832
|
-
MessageTruncated: number;
|
|
833
|
-
NameTooLong: number;
|
|
834
|
-
SampleRateOutOfRange: number;
|
|
835
|
-
SetAuthContextFailed: number;
|
|
836
|
-
SetAuthContextFailedAccountName: number;
|
|
837
|
-
StringValueTooLong: number;
|
|
838
|
-
StartCalledMoreThanOnce: number;
|
|
839
|
-
StopCalledWithoutStart: number;
|
|
840
|
-
TelemetryInitializerFailed: number;
|
|
841
|
-
TrackArgumentsNotSpecified: number;
|
|
842
|
-
UrlTooLong: number;
|
|
843
|
-
SessionStorageBufferFull: number;
|
|
844
|
-
CannotAccessCookie: number;
|
|
845
|
-
IdTooLong: number;
|
|
846
|
-
InvalidEvent: number;
|
|
847
|
-
FailedMonitorAjaxSetRequestHeader: number;
|
|
848
|
-
SendBrowserInfoOnUserInit: number;
|
|
849
|
-
PluginException: number;
|
|
850
|
-
NotificationException: number;
|
|
851
|
-
SnippetScriptLoadFailure: number;
|
|
852
|
-
InvalidInstrumentationKey: number;
|
|
853
|
-
CannotParseAiBlobValue: number;
|
|
854
|
-
InvalidContentBlob: number;
|
|
855
|
-
TrackPageActionEventFailed: number;
|
|
856
|
-
FailedAddingCustomDefinedRequestContext: number;
|
|
857
|
-
InMemoryStorageBufferFull: number;
|
|
858
|
-
};
|
|
806
|
+
export const _InternalMessageId: EnumValue<typeof _eInternalMessageId>;
|
|
859
807
|
|
|
860
808
|
// @public (undocumented)
|
|
861
809
|
export type _InternalMessageId = number | _eInternalMessageId;
|
|
@@ -1068,14 +1016,14 @@ export interface IUnloadHandlerContainer {
|
|
|
1068
1016
|
export function _legacyCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
1069
1017
|
|
|
1070
1018
|
// @public (undocumented)
|
|
1071
|
-
export const LoggingSeverity:
|
|
1072
|
-
CRITICAL: number;
|
|
1073
|
-
WARNING: number;
|
|
1074
|
-
};
|
|
1019
|
+
export const LoggingSeverity: EnumValue<typeof eLoggingSeverity>;
|
|
1075
1020
|
|
|
1076
1021
|
// @public (undocumented)
|
|
1077
1022
|
export type LoggingSeverity = number | eLoggingSeverity;
|
|
1078
1023
|
|
|
1024
|
+
// @public
|
|
1025
|
+
export function _logInternalMessage(logger: IDiagnosticLogger, severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
1026
|
+
|
|
1079
1027
|
// @public (undocumented)
|
|
1080
1028
|
export function mergeEvtNamespace(theNamespace: string, namespaces?: string | string[] | null): string | string[];
|
|
1081
1029
|
|
|
@@ -1195,7 +1143,7 @@ export class ProcessTelemetryContext implements IProcessTelemetryContext {
|
|
|
1195
1143
|
// @public
|
|
1196
1144
|
export function proxyAssign<T, S>(target: T, source: S, chkSet?: (name: string, isFunc?: boolean, source?: S, target?: T) => boolean): T;
|
|
1197
1145
|
|
|
1198
|
-
// @public
|
|
1146
|
+
// @public
|
|
1199
1147
|
export function proxyFunctionAs<T, S>(target: T, name: string, source: S | (() => S), theFunc: (keyof S), overwriteTarget?: boolean): void;
|
|
1200
1148
|
|
|
1201
1149
|
// @public
|
|
@@ -1331,6 +1279,9 @@ export type UnloadHandler = (itemCtx: IProcessTelemetryUnloadContext, unloadStat
|
|
|
1331
1279
|
// @public (undocumented)
|
|
1332
1280
|
export function useXDomainRequest(): boolean | undefined;
|
|
1333
1281
|
|
|
1282
|
+
// @public
|
|
1283
|
+
export function _warnToConsole(logger: IDiagnosticLogger, message: string): void;
|
|
1284
|
+
|
|
1334
1285
|
// (No @packageDocumentation comment for this package)
|
|
1335
1286
|
|
|
1336
1287
|
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 2.8.0-nightly.2204-
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 2.8.0-nightly.2204-07
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -356,12 +356,23 @@ declare namespace ApplicationInsights {
|
|
|
356
356
|
|
|
357
357
|
function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
358
358
|
|
|
359
|
+
/**
|
|
360
|
+
* Create a 2 index map that maps an enum's key as both the key and value, X["key"] => "key" and X[0] => "keyof 0".
|
|
361
|
+
* @param values - The values to populate on the new object
|
|
362
|
+
* @returns
|
|
363
|
+
*/
|
|
364
|
+
function createEnumMap<E, I = keyof E>(values: {
|
|
365
|
+
[key in keyof E]: E[keyof E];
|
|
366
|
+
}): EnumMap<E, I>;
|
|
367
|
+
|
|
359
368
|
/**
|
|
360
369
|
* Create an enum style object which has both the key => value and value => key mappings
|
|
361
370
|
* @param values - The values to populate on the new object
|
|
362
371
|
* @returns
|
|
363
372
|
*/
|
|
364
|
-
function createEnumStyle<
|
|
373
|
+
function createEnumStyle<E>(values: {
|
|
374
|
+
[key in keyof E]: E[keyof E];
|
|
375
|
+
}): EnumValue<E>;
|
|
365
376
|
|
|
366
377
|
/**
|
|
367
378
|
* Creates a new Telemetry Item context with the current config, core and plugin execution chain
|
|
@@ -379,12 +390,27 @@ declare namespace ApplicationInsights {
|
|
|
379
390
|
run: (unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
380
391
|
};
|
|
381
392
|
|
|
393
|
+
/**
|
|
394
|
+
* Create a 2 index map that maps an enum's key and value to the defined map value, X["key"] => mapValue and X[0] => mapValue.
|
|
395
|
+
* Generic values
|
|
396
|
+
* - E = the const enum type (typeof eRequestHeaders);
|
|
397
|
+
* - V = Identifies the valid values for the keys, this should include both the enum numeric and string key of the type. The
|
|
398
|
+
* resulting "Value" of each entry identifies the valid values withing the assignments.
|
|
399
|
+
* @param values - The values to populate on the new object
|
|
400
|
+
* @returns
|
|
401
|
+
*/
|
|
402
|
+
function createValueMap<E, V = E>(values: {
|
|
403
|
+
[key in keyof E]: [eValue: E[keyof E], mapValue: V[keyof V]];
|
|
404
|
+
}): V;
|
|
405
|
+
|
|
382
406
|
/**
|
|
383
407
|
* Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)
|
|
384
408
|
* https://caniuse.com/#search=Date.now
|
|
385
409
|
*/
|
|
386
410
|
function dateNow(): number;
|
|
387
411
|
|
|
412
|
+
function deepFreeze<T>(obj: T): T;
|
|
413
|
+
|
|
388
414
|
/**
|
|
389
415
|
* @deprecated - Use the core.getCookieMgr().del()
|
|
390
416
|
* Deletes a cookie by setting it's expiration time in the past.
|
|
@@ -480,6 +506,36 @@ declare namespace ApplicationInsights {
|
|
|
480
506
|
*/
|
|
481
507
|
function dumpObj(object: any): string;
|
|
482
508
|
|
|
509
|
+
/**
|
|
510
|
+
* The eEventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
511
|
+
*/
|
|
512
|
+
const enum eEventsDiscardedReason {
|
|
513
|
+
/**
|
|
514
|
+
* Unknown.
|
|
515
|
+
*/
|
|
516
|
+
Unknown = 0,
|
|
517
|
+
/**
|
|
518
|
+
* Status set to non-retryable.
|
|
519
|
+
*/
|
|
520
|
+
NonRetryableStatus = 1,
|
|
521
|
+
/**
|
|
522
|
+
* The event is invalid.
|
|
523
|
+
*/
|
|
524
|
+
InvalidEvent = 2,
|
|
525
|
+
/**
|
|
526
|
+
* The size of the event is too large.
|
|
527
|
+
*/
|
|
528
|
+
SizeLimitExceeded = 3,
|
|
529
|
+
/**
|
|
530
|
+
* The server is not accepting events from this instrumentation key.
|
|
531
|
+
*/
|
|
532
|
+
KillSwitch = 4,
|
|
533
|
+
/**
|
|
534
|
+
* The event queue is full.
|
|
535
|
+
*/
|
|
536
|
+
QueueFull = 5
|
|
537
|
+
}
|
|
538
|
+
|
|
483
539
|
const enum _eInternalMessageId {
|
|
484
540
|
BrowserDoesNotSupportLocalStorage = 0,
|
|
485
541
|
BrowserCannotReadLocalStorage = 1,
|
|
@@ -576,6 +632,14 @@ declare namespace ApplicationInsights {
|
|
|
576
632
|
WARNING = 2
|
|
577
633
|
}
|
|
578
634
|
|
|
635
|
+
type EnumMap<E = any, I = E> = {
|
|
636
|
+
readonly [key in keyof E extends string ? keyof E : never]: key extends string ? key : keyof E;
|
|
637
|
+
} & I;
|
|
638
|
+
|
|
639
|
+
type EnumValue<E = any> = {
|
|
640
|
+
readonly [key in keyof E]: E[key];
|
|
641
|
+
};
|
|
642
|
+
|
|
579
643
|
const EventHelper: IEventHelper;
|
|
580
644
|
|
|
581
645
|
/**
|
|
@@ -608,32 +672,9 @@ declare namespace ApplicationInsights {
|
|
|
608
672
|
/**
|
|
609
673
|
* The EventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
610
674
|
*/
|
|
611
|
-
const EventsDiscardedReason:
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
*/
|
|
615
|
-
Unknown: number;
|
|
616
|
-
/**
|
|
617
|
-
* Status set to non-retryable.
|
|
618
|
-
*/
|
|
619
|
-
NonRetryableStatus: number;
|
|
620
|
-
/**
|
|
621
|
-
* The event is invalid.
|
|
622
|
-
*/
|
|
623
|
-
InvalidEvent: number;
|
|
624
|
-
/**
|
|
625
|
-
* The size of the event is too large.
|
|
626
|
-
*/
|
|
627
|
-
SizeLimitExceeded: number;
|
|
628
|
-
/**
|
|
629
|
-
* The server is not accepting events from this instrumentation key.
|
|
630
|
-
*/
|
|
631
|
-
KillSwitch: number;
|
|
632
|
-
/**
|
|
633
|
-
* The event queue is full.
|
|
634
|
-
*/
|
|
635
|
-
QueueFull: number;
|
|
636
|
-
};
|
|
675
|
+
const EventsDiscardedReason: EnumValue<typeof eEventsDiscardedReason>;
|
|
676
|
+
|
|
677
|
+
type EventsDiscardedReason = number | eEventsDiscardedReason;
|
|
637
678
|
|
|
638
679
|
/**
|
|
639
680
|
* generate W3C trace id
|
|
@@ -1734,90 +1775,7 @@ declare namespace ApplicationInsights {
|
|
|
1734
1775
|
/**
|
|
1735
1776
|
* Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered
|
|
1736
1777
|
*/
|
|
1737
|
-
const _InternalMessageId:
|
|
1738
|
-
BrowserDoesNotSupportLocalStorage: number;
|
|
1739
|
-
BrowserCannotReadLocalStorage: number;
|
|
1740
|
-
BrowserCannotReadSessionStorage: number;
|
|
1741
|
-
BrowserCannotWriteLocalStorage: number;
|
|
1742
|
-
BrowserCannotWriteSessionStorage: number;
|
|
1743
|
-
BrowserFailedRemovalFromLocalStorage: number;
|
|
1744
|
-
BrowserFailedRemovalFromSessionStorage: number;
|
|
1745
|
-
CannotSendEmptyTelemetry: number;
|
|
1746
|
-
ClientPerformanceMathError: number;
|
|
1747
|
-
ErrorParsingAISessionCookie: number;
|
|
1748
|
-
ErrorPVCalc: number;
|
|
1749
|
-
ExceptionWhileLoggingError: number;
|
|
1750
|
-
FailedAddingTelemetryToBuffer: number;
|
|
1751
|
-
FailedMonitorAjaxAbort: number;
|
|
1752
|
-
FailedMonitorAjaxDur: number;
|
|
1753
|
-
FailedMonitorAjaxOpen: number;
|
|
1754
|
-
FailedMonitorAjaxRSC: number;
|
|
1755
|
-
FailedMonitorAjaxSend: number;
|
|
1756
|
-
FailedMonitorAjaxGetCorrelationHeader: number;
|
|
1757
|
-
FailedToAddHandlerForOnBeforeUnload: number;
|
|
1758
|
-
FailedToSendQueuedTelemetry: number;
|
|
1759
|
-
FailedToReportDataLoss: number;
|
|
1760
|
-
FlushFailed: number;
|
|
1761
|
-
MessageLimitPerPVExceeded: number;
|
|
1762
|
-
MissingRequiredFieldSpecification: number;
|
|
1763
|
-
NavigationTimingNotSupported: number;
|
|
1764
|
-
OnError: number;
|
|
1765
|
-
SessionRenewalDateIsZero: number;
|
|
1766
|
-
SenderNotInitialized: number;
|
|
1767
|
-
StartTrackEventFailed: number;
|
|
1768
|
-
StopTrackEventFailed: number;
|
|
1769
|
-
StartTrackFailed: number;
|
|
1770
|
-
StopTrackFailed: number;
|
|
1771
|
-
TelemetrySampledAndNotSent: number;
|
|
1772
|
-
TrackEventFailed: number;
|
|
1773
|
-
TrackExceptionFailed: number;
|
|
1774
|
-
TrackMetricFailed: number;
|
|
1775
|
-
TrackPVFailed: number;
|
|
1776
|
-
TrackPVFailedCalc: number;
|
|
1777
|
-
TrackTraceFailed: number;
|
|
1778
|
-
TransmissionFailed: number;
|
|
1779
|
-
FailedToSetStorageBuffer: number;
|
|
1780
|
-
FailedToRestoreStorageBuffer: number;
|
|
1781
|
-
InvalidBackendResponse: number;
|
|
1782
|
-
FailedToFixDepricatedValues: number;
|
|
1783
|
-
InvalidDurationValue: number;
|
|
1784
|
-
TelemetryEnvelopeInvalid: number;
|
|
1785
|
-
CreateEnvelopeError: number;
|
|
1786
|
-
CannotSerializeObject: number;
|
|
1787
|
-
CannotSerializeObjectNonSerializable: number;
|
|
1788
|
-
CircularReferenceDetected: number;
|
|
1789
|
-
ClearAuthContextFailed: number;
|
|
1790
|
-
ExceptionTruncated: number;
|
|
1791
|
-
IllegalCharsInName: number;
|
|
1792
|
-
ItemNotInArray: number;
|
|
1793
|
-
MaxAjaxPerPVExceeded: number;
|
|
1794
|
-
MessageTruncated: number;
|
|
1795
|
-
NameTooLong: number;
|
|
1796
|
-
SampleRateOutOfRange: number;
|
|
1797
|
-
SetAuthContextFailed: number;
|
|
1798
|
-
SetAuthContextFailedAccountName: number;
|
|
1799
|
-
StringValueTooLong: number;
|
|
1800
|
-
StartCalledMoreThanOnce: number;
|
|
1801
|
-
StopCalledWithoutStart: number;
|
|
1802
|
-
TelemetryInitializerFailed: number;
|
|
1803
|
-
TrackArgumentsNotSpecified: number;
|
|
1804
|
-
UrlTooLong: number;
|
|
1805
|
-
SessionStorageBufferFull: number;
|
|
1806
|
-
CannotAccessCookie: number;
|
|
1807
|
-
IdTooLong: number;
|
|
1808
|
-
InvalidEvent: number;
|
|
1809
|
-
FailedMonitorAjaxSetRequestHeader: number;
|
|
1810
|
-
SendBrowserInfoOnUserInit: number;
|
|
1811
|
-
PluginException: number;
|
|
1812
|
-
NotificationException: number;
|
|
1813
|
-
SnippetScriptLoadFailure: number;
|
|
1814
|
-
InvalidInstrumentationKey: number;
|
|
1815
|
-
CannotParseAiBlobValue: number;
|
|
1816
|
-
InvalidContentBlob: number;
|
|
1817
|
-
TrackPageActionEventFailed: number;
|
|
1818
|
-
FailedAddingCustomDefinedRequestContext: number;
|
|
1819
|
-
InMemoryStorageBufferFull: number;
|
|
1820
|
-
};
|
|
1778
|
+
const _InternalMessageId: EnumValue<typeof _eInternalMessageId>;
|
|
1821
1779
|
|
|
1822
1780
|
type _InternalMessageId = number | _eInternalMessageId;
|
|
1823
1781
|
|
|
@@ -2292,13 +2250,18 @@ declare namespace ApplicationInsights {
|
|
|
2292
2250
|
*/
|
|
2293
2251
|
function _legacyCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
2294
2252
|
|
|
2295
|
-
const LoggingSeverity:
|
|
2296
|
-
CRITICAL: number;
|
|
2297
|
-
WARNING: number;
|
|
2298
|
-
};
|
|
2253
|
+
const LoggingSeverity: EnumValue<typeof eLoggingSeverity>;
|
|
2299
2254
|
|
|
2300
2255
|
type LoggingSeverity = number | eLoggingSeverity;
|
|
2301
2256
|
|
|
2257
|
+
/**
|
|
2258
|
+
* Logs a message to the internal queue.
|
|
2259
|
+
* @param logger - The Diagnostic Logger instance to use.
|
|
2260
|
+
* @param severity {LoggingSeverity} - The severity of the log message
|
|
2261
|
+
* @param message {_InternalLogMessage} - The message to log.
|
|
2262
|
+
*/
|
|
2263
|
+
function _logInternalMessage(logger: IDiagnosticLogger, severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
2264
|
+
|
|
2302
2265
|
function mergeEvtNamespace(theNamespace: string, namespaces?: string | string[] | null): string | string[];
|
|
2303
2266
|
|
|
2304
2267
|
const MinChannelPriorty: number;
|
|
@@ -2600,6 +2563,15 @@ declare namespace ApplicationInsights {
|
|
|
2600
2563
|
*/
|
|
2601
2564
|
function proxyAssign<T, S>(target: T, source: S, chkSet?: (name: string, isFunc?: boolean, source?: S, target?: T) => boolean): T;
|
|
2602
2565
|
|
|
2566
|
+
/**
|
|
2567
|
+
* Creates a proxy function on the target which internally will call the source version with all arguments passed to the target method.
|
|
2568
|
+
*
|
|
2569
|
+
* @param target - The target object to be assigned with the source properties and functions
|
|
2570
|
+
* @param name - The function name that will be added on the target
|
|
2571
|
+
* @param source - The source object which will be assigned / called by setting / calling the targets proxies
|
|
2572
|
+
* @param theFunc - The function name on the source that will be proxied on the target
|
|
2573
|
+
* @param overwriteTarget - If `false` this will not replace any pre-existing name otherwise (the default) it will overwrite any existing name
|
|
2574
|
+
*/
|
|
2603
2575
|
function proxyFunctionAs<T, S>(target: T, name: string, source: S | (() => S), theFunc: (keyof S), overwriteTarget?: boolean): void;
|
|
2604
2576
|
|
|
2605
2577
|
/**
|
|
@@ -2608,6 +2580,7 @@ declare namespace ApplicationInsights {
|
|
|
2608
2580
|
* @param target - The target object to be assigned with the source properties and functions
|
|
2609
2581
|
* @param source - The source object which will be assigned / called by setting / calling the targets proxies
|
|
2610
2582
|
* @param functionsToProxy - An array of function names that will be proxied on the target
|
|
2583
|
+
* @param overwriteTarget - If false this will not replace any pre-existing name otherwise (the default) it will overwrite any existing name
|
|
2611
2584
|
*/
|
|
2612
2585
|
function proxyFunctions<T, S>(target: T, source: S | (() => S), functionsToProxy: (keyof S)[], overwriteTarget?: boolean): T;
|
|
2613
2586
|
|
|
@@ -2885,5 +2858,12 @@ declare namespace ApplicationInsights {
|
|
|
2885
2858
|
|
|
2886
2859
|
function useXDomainRequest(): boolean | undefined;
|
|
2887
2860
|
|
|
2861
|
+
/**
|
|
2862
|
+
* This is a helper method which will call warnToConsole on the passed logger with the provided message.
|
|
2863
|
+
* @param logger - The Diagnostic Logger instance to use.
|
|
2864
|
+
* @param message {_InternalLogMessage} - The log message.
|
|
2865
|
+
*/
|
|
2866
|
+
function _warnToConsole(logger: IDiagnosticLogger, message: string): void;
|
|
2867
|
+
|
|
2888
2868
|
|
|
2889
2869
|
}
|