@microsoft/applicationinsights-core-js 2.8.0-nightly.2204-04 → 2.8.0-nightly.2204-05
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 +311 -276
- 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 +674 -36
- package/dist/applicationinsights-core-js.api.md +46 -98
- package/dist/applicationinsights-core-js.d.ts +94 -116
- package/dist/applicationinsights-core-js.js +311 -276
- 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 +94 -116
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +2 -4
- 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 +2 -4
- 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,6 +166,11 @@ 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
|
|
|
@@ -194,6 +206,16 @@ export function doPerf<T>(mgrSource: IPerfManagerProvider | IPerfManager, getSou
|
|
|
194
206
|
// @public
|
|
195
207
|
export function dumpObj(object: any): string;
|
|
196
208
|
|
|
209
|
+
// @public
|
|
210
|
+
export const enum eEventsDiscardedReason {
|
|
211
|
+
InvalidEvent = 2,
|
|
212
|
+
KillSwitch = 4,
|
|
213
|
+
NonRetryableStatus = 1,
|
|
214
|
+
QueueFull = 5,
|
|
215
|
+
SizeLimitExceeded = 3,
|
|
216
|
+
Unknown = 0
|
|
217
|
+
}
|
|
218
|
+
|
|
197
219
|
// @public (undocumented)
|
|
198
220
|
export const enum _eInternalMessageId {
|
|
199
221
|
// (undocumented)
|
|
@@ -368,6 +390,16 @@ export const enum eLoggingSeverity {
|
|
|
368
390
|
WARNING = 2
|
|
369
391
|
}
|
|
370
392
|
|
|
393
|
+
// @public (undocumented)
|
|
394
|
+
export type EnumMap<E = any, I = E> = {
|
|
395
|
+
readonly [key in keyof E extends string ? keyof E : never]: key extends string ? key : keyof E;
|
|
396
|
+
} & I;
|
|
397
|
+
|
|
398
|
+
// @public (undocumented)
|
|
399
|
+
export type EnumValue<E = any> = {
|
|
400
|
+
readonly [key in keyof E]: E[key];
|
|
401
|
+
};
|
|
402
|
+
|
|
371
403
|
// @public (undocumented)
|
|
372
404
|
export const EventHelper: IEventHelper;
|
|
373
405
|
|
|
@@ -378,14 +410,10 @@ export function eventOff<T>(target: T, eventName: string, handlerRef: any, evtNa
|
|
|
378
410
|
export function eventOn<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[] | null, useCapture?: boolean): boolean;
|
|
379
411
|
|
|
380
412
|
// @public
|
|
381
|
-
export const EventsDiscardedReason:
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
SizeLimitExceeded: number;
|
|
386
|
-
KillSwitch: number;
|
|
387
|
-
QueueFull: number;
|
|
388
|
-
};
|
|
413
|
+
export const EventsDiscardedReason: EnumValue<typeof eEventsDiscardedReason>;
|
|
414
|
+
|
|
415
|
+
// @public (undocumented)
|
|
416
|
+
export type EventsDiscardedReason = number | eEventsDiscardedReason;
|
|
389
417
|
|
|
390
418
|
// @public
|
|
391
419
|
export function generateW3CId(): string;
|
|
@@ -772,90 +800,7 @@ export class _InternalLogMessage {
|
|
|
772
800
|
}
|
|
773
801
|
|
|
774
802
|
// @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
|
-
};
|
|
803
|
+
export const _InternalMessageId: EnumValue<typeof _eInternalMessageId>;
|
|
859
804
|
|
|
860
805
|
// @public (undocumented)
|
|
861
806
|
export type _InternalMessageId = number | _eInternalMessageId;
|
|
@@ -1068,14 +1013,14 @@ export interface IUnloadHandlerContainer {
|
|
|
1068
1013
|
export function _legacyCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
1069
1014
|
|
|
1070
1015
|
// @public (undocumented)
|
|
1071
|
-
export const LoggingSeverity:
|
|
1072
|
-
CRITICAL: number;
|
|
1073
|
-
WARNING: number;
|
|
1074
|
-
};
|
|
1016
|
+
export const LoggingSeverity: EnumValue<typeof eLoggingSeverity>;
|
|
1075
1017
|
|
|
1076
1018
|
// @public (undocumented)
|
|
1077
1019
|
export type LoggingSeverity = number | eLoggingSeverity;
|
|
1078
1020
|
|
|
1021
|
+
// @public
|
|
1022
|
+
export function _logInternalMessage(logger: IDiagnosticLogger, severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
1023
|
+
|
|
1079
1024
|
// @public (undocumented)
|
|
1080
1025
|
export function mergeEvtNamespace(theNamespace: string, namespaces?: string | string[] | null): string | string[];
|
|
1081
1026
|
|
|
@@ -1195,7 +1140,7 @@ export class ProcessTelemetryContext implements IProcessTelemetryContext {
|
|
|
1195
1140
|
// @public
|
|
1196
1141
|
export function proxyAssign<T, S>(target: T, source: S, chkSet?: (name: string, isFunc?: boolean, source?: S, target?: T) => boolean): T;
|
|
1197
1142
|
|
|
1198
|
-
// @public
|
|
1143
|
+
// @public
|
|
1199
1144
|
export function proxyFunctionAs<T, S>(target: T, name: string, source: S | (() => S), theFunc: (keyof S), overwriteTarget?: boolean): void;
|
|
1200
1145
|
|
|
1201
1146
|
// @public
|
|
@@ -1331,6 +1276,9 @@ export type UnloadHandler = (itemCtx: IProcessTelemetryUnloadContext, unloadStat
|
|
|
1331
1276
|
// @public (undocumented)
|
|
1332
1277
|
export function useXDomainRequest(): boolean | undefined;
|
|
1333
1278
|
|
|
1279
|
+
// @public
|
|
1280
|
+
export function _warnToConsole(logger: IDiagnosticLogger, message: string): void;
|
|
1281
|
+
|
|
1334
1282
|
// (No @packageDocumentation comment for this package)
|
|
1335
1283
|
|
|
1336
1284
|
```
|
|
@@ -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-05
|
|
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,6 +390,19 @@ 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
|
|
@@ -480,6 +504,36 @@ declare namespace ApplicationInsights {
|
|
|
480
504
|
*/
|
|
481
505
|
function dumpObj(object: any): string;
|
|
482
506
|
|
|
507
|
+
/**
|
|
508
|
+
* The eEventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
509
|
+
*/
|
|
510
|
+
const enum eEventsDiscardedReason {
|
|
511
|
+
/**
|
|
512
|
+
* Unknown.
|
|
513
|
+
*/
|
|
514
|
+
Unknown = 0,
|
|
515
|
+
/**
|
|
516
|
+
* Status set to non-retryable.
|
|
517
|
+
*/
|
|
518
|
+
NonRetryableStatus = 1,
|
|
519
|
+
/**
|
|
520
|
+
* The event is invalid.
|
|
521
|
+
*/
|
|
522
|
+
InvalidEvent = 2,
|
|
523
|
+
/**
|
|
524
|
+
* The size of the event is too large.
|
|
525
|
+
*/
|
|
526
|
+
SizeLimitExceeded = 3,
|
|
527
|
+
/**
|
|
528
|
+
* The server is not accepting events from this instrumentation key.
|
|
529
|
+
*/
|
|
530
|
+
KillSwitch = 4,
|
|
531
|
+
/**
|
|
532
|
+
* The event queue is full.
|
|
533
|
+
*/
|
|
534
|
+
QueueFull = 5
|
|
535
|
+
}
|
|
536
|
+
|
|
483
537
|
const enum _eInternalMessageId {
|
|
484
538
|
BrowserDoesNotSupportLocalStorage = 0,
|
|
485
539
|
BrowserCannotReadLocalStorage = 1,
|
|
@@ -576,6 +630,14 @@ declare namespace ApplicationInsights {
|
|
|
576
630
|
WARNING = 2
|
|
577
631
|
}
|
|
578
632
|
|
|
633
|
+
type EnumMap<E = any, I = E> = {
|
|
634
|
+
readonly [key in keyof E extends string ? keyof E : never]: key extends string ? key : keyof E;
|
|
635
|
+
} & I;
|
|
636
|
+
|
|
637
|
+
type EnumValue<E = any> = {
|
|
638
|
+
readonly [key in keyof E]: E[key];
|
|
639
|
+
};
|
|
640
|
+
|
|
579
641
|
const EventHelper: IEventHelper;
|
|
580
642
|
|
|
581
643
|
/**
|
|
@@ -608,32 +670,9 @@ declare namespace ApplicationInsights {
|
|
|
608
670
|
/**
|
|
609
671
|
* The EventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
|
|
610
672
|
*/
|
|
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
|
-
};
|
|
673
|
+
const EventsDiscardedReason: EnumValue<typeof eEventsDiscardedReason>;
|
|
674
|
+
|
|
675
|
+
type EventsDiscardedReason = number | eEventsDiscardedReason;
|
|
637
676
|
|
|
638
677
|
/**
|
|
639
678
|
* generate W3C trace id
|
|
@@ -1734,90 +1773,7 @@ declare namespace ApplicationInsights {
|
|
|
1734
1773
|
/**
|
|
1735
1774
|
* Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered
|
|
1736
1775
|
*/
|
|
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
|
-
};
|
|
1776
|
+
const _InternalMessageId: EnumValue<typeof _eInternalMessageId>;
|
|
1821
1777
|
|
|
1822
1778
|
type _InternalMessageId = number | _eInternalMessageId;
|
|
1823
1779
|
|
|
@@ -2292,13 +2248,18 @@ declare namespace ApplicationInsights {
|
|
|
2292
2248
|
*/
|
|
2293
2249
|
function _legacyCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
|
|
2294
2250
|
|
|
2295
|
-
const LoggingSeverity:
|
|
2296
|
-
CRITICAL: number;
|
|
2297
|
-
WARNING: number;
|
|
2298
|
-
};
|
|
2251
|
+
const LoggingSeverity: EnumValue<typeof eLoggingSeverity>;
|
|
2299
2252
|
|
|
2300
2253
|
type LoggingSeverity = number | eLoggingSeverity;
|
|
2301
2254
|
|
|
2255
|
+
/**
|
|
2256
|
+
* Logs a message to the internal queue.
|
|
2257
|
+
* @param logger - The Diagnostic Logger instance to use.
|
|
2258
|
+
* @param severity {LoggingSeverity} - The severity of the log message
|
|
2259
|
+
* @param message {_InternalLogMessage} - The message to log.
|
|
2260
|
+
*/
|
|
2261
|
+
function _logInternalMessage(logger: IDiagnosticLogger, severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
2262
|
+
|
|
2302
2263
|
function mergeEvtNamespace(theNamespace: string, namespaces?: string | string[] | null): string | string[];
|
|
2303
2264
|
|
|
2304
2265
|
const MinChannelPriorty: number;
|
|
@@ -2600,6 +2561,15 @@ declare namespace ApplicationInsights {
|
|
|
2600
2561
|
*/
|
|
2601
2562
|
function proxyAssign<T, S>(target: T, source: S, chkSet?: (name: string, isFunc?: boolean, source?: S, target?: T) => boolean): T;
|
|
2602
2563
|
|
|
2564
|
+
/**
|
|
2565
|
+
* Creates a proxy function on the target which internally will call the source version with all arguments passed to the target method.
|
|
2566
|
+
*
|
|
2567
|
+
* @param target - The target object to be assigned with the source properties and functions
|
|
2568
|
+
* @param name - The function name that will be added on the target
|
|
2569
|
+
* @param source - The source object which will be assigned / called by setting / calling the targets proxies
|
|
2570
|
+
* @param theFunc - The function name on the source that will be proxied on the target
|
|
2571
|
+
* @param overwriteTarget - If `false` this will not replace any pre-existing name otherwise (the default) it will overwrite any existing name
|
|
2572
|
+
*/
|
|
2603
2573
|
function proxyFunctionAs<T, S>(target: T, name: string, source: S | (() => S), theFunc: (keyof S), overwriteTarget?: boolean): void;
|
|
2604
2574
|
|
|
2605
2575
|
/**
|
|
@@ -2608,6 +2578,7 @@ declare namespace ApplicationInsights {
|
|
|
2608
2578
|
* @param target - The target object to be assigned with the source properties and functions
|
|
2609
2579
|
* @param source - The source object which will be assigned / called by setting / calling the targets proxies
|
|
2610
2580
|
* @param functionsToProxy - An array of function names that will be proxied on the target
|
|
2581
|
+
* @param overwriteTarget - If false this will not replace any pre-existing name otherwise (the default) it will overwrite any existing name
|
|
2611
2582
|
*/
|
|
2612
2583
|
function proxyFunctions<T, S>(target: T, source: S | (() => S), functionsToProxy: (keyof S)[], overwriteTarget?: boolean): T;
|
|
2613
2584
|
|
|
@@ -2885,5 +2856,12 @@ declare namespace ApplicationInsights {
|
|
|
2885
2856
|
|
|
2886
2857
|
function useXDomainRequest(): boolean | undefined;
|
|
2887
2858
|
|
|
2859
|
+
/**
|
|
2860
|
+
* This is a helper method which will call warnToConsole on the passed logger with the provided message.
|
|
2861
|
+
* @param logger - The Diagnostic Logger instance to use.
|
|
2862
|
+
* @param message {_InternalLogMessage} - The log message.
|
|
2863
|
+
*/
|
|
2864
|
+
function _warnToConsole(logger: IDiagnosticLogger, message: string): void;
|
|
2865
|
+
|
|
2888
2866
|
|
|
2889
2867
|
}
|