@microsoft/applicationinsights-web-basic 2.8.0-beta.2203-01 → 2.8.0-beta.2203-02

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft.ApplicationInsights, 2.8.0-beta.2203-01
2
+ * Microsoft.ApplicationInsights, 2.8.0-beta.2203-02
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -107,6 +107,10 @@ declare class BaseCore implements IAppInsightsCore {
107
107
  */
108
108
  addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
109
109
  getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
110
+ /**
111
+ * Returns the unique event namespace that should be used
112
+ */
113
+ evtNamespace(): string;
110
114
  protected releaseQueue(): void;
111
115
  }
112
116
 
@@ -155,8 +159,26 @@ declare abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
155
159
  * Internal helper to allow setting of the internal initialized setting for inherited instances and unit testing
156
160
  */
157
161
  protected setInitialized: (isInitialized: boolean) => void;
162
+ /**
163
+ * Teardown / Unload hook to allow implementations to perform some additional unload operations before the BaseTelemetryPlugin
164
+ * finishes it's removal.
165
+ * @param unloadCtx - This is the context that should be used during unloading.
166
+ * @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
167
+ * @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.
168
+ * @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
169
+ */
170
+ protected _doTeardown?: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void) => void | boolean;
158
171
  constructor();
159
172
  initialize(config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
173
+ /**
174
+ * Tear down the plugin and remove any hooked value, the plugin should be removed so that it is no longer initialized and
175
+ * therefore could be re-initialized after being torn down. The plugin should ensure that once this has been called any further
176
+ * processTelemetry calls are ignored and it just calls the processNext() with the provided context.
177
+ * @param unloadCtx - This is the context that should be used during unloading.
178
+ * @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
179
+ * @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
180
+ */
181
+ teardown(unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState): void | boolean;
160
182
  abstract processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
161
183
  /**
162
184
  * Add this hook so that it is automatically removed during unloading
@@ -173,7 +195,15 @@ declare abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
173
195
  */
174
196
  export declare const CoreUtils: ICoreUtils;
175
197
 
176
- declare enum DistributedTracingModes {
198
+ declare const DistributedTracingModes: {
199
+ AI: number;
200
+ AI_AND_W3C: number;
201
+ W3C: number;
202
+ };
203
+
204
+ declare type DistributedTracingModes = number | eDistributedTracingModes;
205
+
206
+ declare const enum eDistributedTracingModes {
177
207
  /**
178
208
  * (Default) Send Application Insights correlation headers
179
209
  */
@@ -188,6 +218,102 @@ declare enum DistributedTracingModes {
188
218
  W3C = 2
189
219
  }
190
220
 
221
+ declare const enum _eInternalMessageId {
222
+ BrowserDoesNotSupportLocalStorage = 0,
223
+ BrowserCannotReadLocalStorage = 1,
224
+ BrowserCannotReadSessionStorage = 2,
225
+ BrowserCannotWriteLocalStorage = 3,
226
+ BrowserCannotWriteSessionStorage = 4,
227
+ BrowserFailedRemovalFromLocalStorage = 5,
228
+ BrowserFailedRemovalFromSessionStorage = 6,
229
+ CannotSendEmptyTelemetry = 7,
230
+ ClientPerformanceMathError = 8,
231
+ ErrorParsingAISessionCookie = 9,
232
+ ErrorPVCalc = 10,
233
+ ExceptionWhileLoggingError = 11,
234
+ FailedAddingTelemetryToBuffer = 12,
235
+ FailedMonitorAjaxAbort = 13,
236
+ FailedMonitorAjaxDur = 14,
237
+ FailedMonitorAjaxOpen = 15,
238
+ FailedMonitorAjaxRSC = 16,
239
+ FailedMonitorAjaxSend = 17,
240
+ FailedMonitorAjaxGetCorrelationHeader = 18,
241
+ FailedToAddHandlerForOnBeforeUnload = 19,
242
+ FailedToSendQueuedTelemetry = 20,
243
+ FailedToReportDataLoss = 21,
244
+ FlushFailed = 22,
245
+ MessageLimitPerPVExceeded = 23,
246
+ MissingRequiredFieldSpecification = 24,
247
+ NavigationTimingNotSupported = 25,
248
+ OnError = 26,
249
+ SessionRenewalDateIsZero = 27,
250
+ SenderNotInitialized = 28,
251
+ StartTrackEventFailed = 29,
252
+ StopTrackEventFailed = 30,
253
+ StartTrackFailed = 31,
254
+ StopTrackFailed = 32,
255
+ TelemetrySampledAndNotSent = 33,
256
+ TrackEventFailed = 34,
257
+ TrackExceptionFailed = 35,
258
+ TrackMetricFailed = 36,
259
+ TrackPVFailed = 37,
260
+ TrackPVFailedCalc = 38,
261
+ TrackTraceFailed = 39,
262
+ TransmissionFailed = 40,
263
+ FailedToSetStorageBuffer = 41,
264
+ FailedToRestoreStorageBuffer = 42,
265
+ InvalidBackendResponse = 43,
266
+ FailedToFixDepricatedValues = 44,
267
+ InvalidDurationValue = 45,
268
+ TelemetryEnvelopeInvalid = 46,
269
+ CreateEnvelopeError = 47,
270
+ CannotSerializeObject = 48,
271
+ CannotSerializeObjectNonSerializable = 49,
272
+ CircularReferenceDetected = 50,
273
+ ClearAuthContextFailed = 51,
274
+ ExceptionTruncated = 52,
275
+ IllegalCharsInName = 53,
276
+ ItemNotInArray = 54,
277
+ MaxAjaxPerPVExceeded = 55,
278
+ MessageTruncated = 56,
279
+ NameTooLong = 57,
280
+ SampleRateOutOfRange = 58,
281
+ SetAuthContextFailed = 59,
282
+ SetAuthContextFailedAccountName = 60,
283
+ StringValueTooLong = 61,
284
+ StartCalledMoreThanOnce = 62,
285
+ StopCalledWithoutStart = 63,
286
+ TelemetryInitializerFailed = 64,
287
+ TrackArgumentsNotSpecified = 65,
288
+ UrlTooLong = 66,
289
+ SessionStorageBufferFull = 67,
290
+ CannotAccessCookie = 68,
291
+ IdTooLong = 69,
292
+ InvalidEvent = 70,
293
+ FailedMonitorAjaxSetRequestHeader = 71,
294
+ SendBrowserInfoOnUserInit = 72,
295
+ PluginException = 73,
296
+ NotificationException = 74,
297
+ SnippetScriptLoadFailure = 99,
298
+ InvalidInstrumentationKey = 100,
299
+ CannotParseAiBlobValue = 101,
300
+ InvalidContentBlob = 102,
301
+ TrackPageActionEventFailed = 103,
302
+ FailedAddingCustomDefinedRequestContext = 104,
303
+ InMemoryStorageBufferFull = 105
304
+ }
305
+
306
+ declare const enum eLoggingSeverity {
307
+ /**
308
+ * Error will be sent as internal telemetry
309
+ */
310
+ CRITICAL = 1,
311
+ /**
312
+ * Error will NOT be sent as internal telemetry, and will only be shown in browser console
313
+ */
314
+ WARNING = 2
315
+ }
316
+
191
317
  declare const enum GetExtCfgMergeType {
192
318
  None = 0,
193
319
  MergeDefaultOnly = 1,
@@ -246,6 +372,10 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
246
372
  * @param pluginIdentifier
247
373
  */
248
374
  getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
375
+ /**
376
+ * Returns the unique event namespace that should be used when registering events
377
+ */
378
+ evtNamespace(): string;
249
379
  }
250
380
 
251
381
  /**
@@ -329,6 +459,67 @@ declare interface IBackendResponse {
329
459
  readonly appId?: string;
330
460
  }
331
461
 
462
+ declare interface IBaseProcessingContext {
463
+ /**
464
+ * The current core instance for the request
465
+ */
466
+ core: () => IAppInsightsCore;
467
+ /**
468
+ * THe current diagnostic logger for the request
469
+ */
470
+ diagLog: () => IDiagnosticLogger;
471
+ /**
472
+ * Gets the current core config instance
473
+ */
474
+ getCfg: () => IConfiguration;
475
+ /**
476
+ * Gets the named extension config
477
+ */
478
+ getExtCfg: <T>(identifier: string, defaultValue?: T | any, mergeDefault?: GetExtCfgMergeType) => T;
479
+ /**
480
+ * Gets the named config from either the named identifier extension or core config if neither exist then the
481
+ * default value is returned
482
+ * @param identifier The named extension identifier
483
+ * @param field The config field name
484
+ * @param defaultValue The default value to return if no defined config exists
485
+ */
486
+ getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean | string[] | RegExp[] | Function) => number | string | boolean | string[] | RegExp[] | Function;
487
+ /**
488
+ * Helper to allow plugins to check and possibly shortcut executing code only
489
+ * required if there is a nextPlugin
490
+ */
491
+ hasNext: () => boolean;
492
+ /**
493
+ * Returns the next configured plugin proxy
494
+ */
495
+ getNext: () => ITelemetryPluginChain;
496
+ /**
497
+ * Helper to set the next plugin proxy
498
+ */
499
+ setNext: (nextCtx: ITelemetryPluginChain) => void;
500
+ /**
501
+ * Synchronously iterate over the context chain running the callback for each plugin, once
502
+ * every plugin has been executed via the callback, any associated onComplete will be called.
503
+ * @param callback - The function call for each plugin in the context chain
504
+ */
505
+ iterate: <T extends ITelemetryPlugin = ITelemetryPlugin>(callback: (plugin: T) => void) => void;
506
+ /**
507
+ * Set the function to call when the current chain has executed all processNext or unloadNext items.
508
+ * @param onComplete - The onComplete to call
509
+ * @param that - The "this" value to use for the onComplete call, if not provided or undefined defaults to the current context
510
+ * @param args - Any additional arguments to pass to the onComplete function
511
+ */
512
+ onComplete: (onComplete: Function, that?: any, ...args: any[]) => void;
513
+ /**
514
+ * Create a new context using the core and config from the current instance, returns a new instance of the same type
515
+ * @param plugins - The execution order to process the plugins, if null or not supplied
516
+ * then the current execution order will be copied.
517
+ * @param startAt - The plugin to start processing from, if missing from the execution
518
+ * order then the next plugin will be NOT set.
519
+ */
520
+ createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IBaseProcessingContext;
521
+ }
522
+
332
523
  /**
333
524
  * Provides data transmission capabilities
334
525
  */
@@ -342,9 +533,14 @@ declare interface IChannelControls extends ITelemetryPlugin {
342
533
  */
343
534
  resume(): void;
344
535
  /**
345
- * Tear down transmission pipeline
536
+ * Tear down the plugin and remove any hooked value, the plugin should be removed so that it is no longer initialized and
537
+ * therefore could be re-initialized after being torn down. The plugin should ensure that once this has been called any further
538
+ * processTelemetry calls are ignored and it just calls the processNext() with the provided context.
539
+ * @param unloadCtx - This is the context that should be used during unloading.
540
+ * @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
541
+ * @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
346
542
  */
347
- teardown(): void;
543
+ teardown: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
348
544
  /**
349
545
  * Flush to send data immediately; channel should default to sending data asynchronously
350
546
  * @param async - send data asynchronously when true
@@ -1028,7 +1224,7 @@ declare interface ICoreUtils {
1028
1224
  * @param callback {any} - The callback function that needs to be executed for the given event
1029
1225
  * @return {boolean} - true if the handler was successfully added
1030
1226
  */
1031
- addEventHandler: (eventName: string, callback: any) => boolean;
1227
+ addEventHandler: (eventName: string, callback: any, evtNamespace?: string | string[]) => boolean;
1032
1228
  /**
1033
1229
  * 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)
1034
1230
  * https://caniuse.com/#search=Date.now
@@ -1257,6 +1453,19 @@ declare interface IInstrumentHooksCallbacks {
1257
1453
 
1258
1454
  declare interface ILoadedPlugin<T extends IPlugin> {
1259
1455
  plugin: T;
1456
+ /**
1457
+ * Identifies whether the plugin is enabled and can process events. This is slightly different from isInitialized as the plugin may be initialized but disabled
1458
+ * via the setEnabled() or it may be a shared plugin which has had it's teardown function called from another instance..
1459
+ * @returns boolean = true if the plugin is in a state where it is operational.
1460
+ */
1461
+ isEnabled: () => boolean;
1462
+ /**
1463
+ * You can optionally enable / disable a plugin from processing events.
1464
+ * Setting enabled to true will not necessarily cause the `isEnabled()` to also return true
1465
+ * as the plugin must also have been successfully initialized and not had it's `teardown` method called
1466
+ * (unless it's also been re-initialized)
1467
+ */
1468
+ setEnabled: (isEnabled: boolean) => void;
1260
1469
  }
1261
1470
 
1262
1471
  export declare interface IMetricTelemetry extends IPartC {
@@ -1478,7 +1687,7 @@ declare const _InternalMessageId: {
1478
1687
  InMemoryStorageBufferFull: number;
1479
1688
  };
1480
1689
 
1481
- declare type _InternalMessageId = number | typeof _InternalMessageId;
1690
+ declare type _InternalMessageId = number | _eInternalMessageId;
1482
1691
 
1483
1692
  export declare interface IPageViewPerformanceTelemetry extends IPartC {
1484
1693
  /**
@@ -1693,10 +1902,14 @@ declare interface IPlugin {
1693
1902
  */
1694
1903
  isInitialized?: () => boolean;
1695
1904
  /**
1696
- * Tear down the plugin and remove any hooked value, the plugin should remove that it is no longer initialized and
1697
- * therefore can be re-initialized after being torn down.
1905
+ * Tear down the plugin and remove any hooked value, the plugin should be removed so that it is no longer initialized and
1906
+ * therefore could be re-initialized after being torn down. The plugin should ensure that once this has been called any further
1907
+ * processTelemetry calls are ignored and it just calls the processNext() with the provided context.
1908
+ * @param unloadCtx - This is the context that should be used during unloading.
1909
+ * @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
1910
+ * @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
1698
1911
  */
1699
- teardown?: () => void;
1912
+ teardown?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
1700
1913
  /**
1701
1914
  * Extension name
1702
1915
  */
@@ -1711,67 +1924,42 @@ declare interface IPlugin {
1711
1924
  * The current context for the current call to processTelemetry(), used to support sharing the same plugin instance
1712
1925
  * between multiple AppInsights instances
1713
1926
  */
1714
- declare interface IProcessTelemetryContext {
1715
- /**
1716
- * The current core instance for the request
1717
- */
1718
- core: () => IAppInsightsCore;
1719
- /**
1720
- * THe current diagnostic logger for the request
1721
- */
1722
- diagLog: () => IDiagnosticLogger;
1723
- /**
1724
- * Gets the current core config instance
1725
- */
1726
- getCfg: () => IConfiguration;
1727
- /**
1728
- * Gets the named extension config
1729
- */
1730
- getExtCfg: <T>(identifier: string, defaultValue?: T | any, mergeDefault?: GetExtCfgMergeType) => T;
1731
- /**
1732
- * Gets the named config from either the named identifier extension or core config if neither exist then the
1733
- * default value is returned
1734
- * @param identifier The named extension identifier
1735
- * @param field The config field name
1736
- * @param defaultValue The default value to return if no defined config exists
1737
- */
1738
- getConfig: (identifier: string, field: string, defaultValue?: number | string | boolean | string[] | RegExp[] | Function) => number | string | boolean | string[] | RegExp[] | Function;
1739
- /**
1740
- * Helper to allow plugins to check and possibly shortcut executing code only
1741
- * required if there is a nextPlugin
1742
- */
1743
- hasNext: () => boolean;
1744
- /**
1745
- * Returns the next configured plugin proxy
1746
- */
1747
- getNext: () => ITelemetryPluginChain;
1748
- /**
1749
- * Helper to set the next plugin proxy
1750
- */
1751
- setNext: (nextCtx: ITelemetryPluginChain) => void;
1927
+ declare interface IProcessTelemetryContext extends IBaseProcessingContext {
1752
1928
  /**
1753
1929
  * Call back for telemetry processing before it it is sent
1754
1930
  * @param env - This is the current event being reported
1931
+ * @returns boolean (true) if there is no more plugins to process otherwise false or undefined (void)
1755
1932
  */
1756
- processNext: (env: ITelemetryItem) => void;
1933
+ processNext: (env: ITelemetryItem) => boolean | void;
1757
1934
  /**
1758
- * Synchronously iterate over the context chain running the callback for each plugin, once
1759
- * every plugin has been executed via the callback, any associated onComplete will be called.
1760
- * @param callback - The function call for each plugin in the context chain
1761
- */
1762
- iterate: <T extends ITelemetryPlugin = ITelemetryPlugin>(callback: (plugin: T) => void) => void;
1763
- /**
1764
- * Create a new context using the core and config from the current instance
1935
+ * Create a new context using the core and config from the current instance, returns a new instance of the same type
1765
1936
  * @param plugins - The execution order to process the plugins, if null or not supplied
1766
1937
  * then the current execution order will be copied.
1767
1938
  * @param startAt - The plugin to start processing from, if missing from the execution
1768
1939
  * order then the next plugin will be NOT set.
1769
1940
  */
1770
1941
  createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryContext;
1942
+ }
1943
+
1944
+ /**
1945
+ * The current context for the current call to processTelemetry(), used to support sharing the same plugin instance
1946
+ * between multiple AppInsights instances
1947
+ */
1948
+ declare interface IProcessTelemetryUnloadContext extends IBaseProcessingContext {
1771
1949
  /**
1772
- * Set the function to call when the current chain has executed all processNext or unloadNext items.
1950
+ * This Plugin has finished unloading, so unload the next one
1951
+ * @param uploadState - The state of the unload process
1952
+ * @returns boolean (true) if there is no more plugins to process otherwise false or undefined (void)
1773
1953
  */
1774
- onComplete: (onComplete: () => void) => void;
1954
+ processNext: (unloadState: ITelemetryUnloadState) => boolean | void;
1955
+ /**
1956
+ * Create a new context using the core and config from the current instance, returns a new instance of the same type
1957
+ * @param plugins - The execution order to process the plugins, if null or not supplied
1958
+ * then the current execution order will be copied.
1959
+ * @param startAt - The plugin to start processing from, if missing from the execution
1960
+ * order then the next plugin will be NOT set.
1961
+ */
1962
+ createNew: (plugins?: IPlugin[] | ITelemetryPluginChain, startAt?: IPlugin) => IProcessTelemetryUnloadContext;
1775
1963
  }
1776
1964
 
1777
1965
  declare interface IRequestContext {
@@ -1966,15 +2154,7 @@ export declare interface ITelemetryItem {
1966
2154
  /**
1967
2155
  * Configuration provided to SDK core
1968
2156
  */
1969
- declare interface ITelemetryPlugin extends IPlugin {
1970
- /**
1971
- * Call back for telemetry processing before it it is sent
1972
- * @param env - This is the current event being reported
1973
- * @param itemCtx - This is the context for the current request, ITelemetryPlugin instances
1974
- * can optionally use this to access the current core instance or define / pass additional information
1975
- * to later plugins (vs appending items to the telemetry item)
1976
- */
1977
- processTelemetry: (env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => void;
2157
+ declare interface ITelemetryPlugin extends ITelemetryProcessor, IPlugin {
1978
2158
  /**
1979
2159
  * Set next extension for telemetry processing, this is not optional as plugins should use the
1980
2160
  * processNext() function of the passed IProcessTelemetryContext instead. It is being kept for
@@ -1990,7 +2170,7 @@ declare interface ITelemetryPlugin extends IPlugin {
1990
2170
  /**
1991
2171
  * Configuration provided to SDK core
1992
2172
  */
1993
- declare interface ITelemetryPluginChain {
2173
+ declare interface ITelemetryPluginChain extends ITelemetryProcessor {
1994
2174
  /**
1995
2175
  * Returns the underlying plugin that is being proxied for the processTelemetry call
1996
2176
  */
@@ -1999,6 +2179,16 @@ declare interface ITelemetryPluginChain {
1999
2179
  * Returns the next plugin
2000
2180
  */
2001
2181
  getNext: () => ITelemetryPluginChain;
2182
+ /**
2183
+ * This plugin is being unloaded and should remove any hooked events and cleanup any global/scoped values, after this
2184
+ * call the plugin will be removed from the telemetry processing chain and will no longer receive any events..
2185
+ * @param unloadCtx - The unload context to use for this call.
2186
+ * @param unloadState - The details of the unload operation
2187
+ */
2188
+ unload?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
2189
+ }
2190
+
2191
+ declare interface ITelemetryProcessor {
2002
2192
  /**
2003
2193
  * Call back for telemetry processing before it it is sent
2004
2194
  * @param env - This is the current event being reported
@@ -2006,7 +2196,13 @@ declare interface ITelemetryPluginChain {
2006
2196
  * can optionally use this to access the current core instance or define / pass additional information
2007
2197
  * to later plugins (vs appending items to the telemetry item)
2008
2198
  */
2009
- processTelemetry: (env: ITelemetryItem, itemCtx: IProcessTelemetryContext) => void;
2199
+ processTelemetry: (env: ITelemetryItem, itemCtx?: IProcessTelemetryContext) => void;
2200
+ }
2201
+
2202
+ declare interface ITelemetryUnloadState {
2203
+ reason: TelemetryUnloadReason;
2204
+ isAsync: boolean;
2205
+ flushComplete?: boolean;
2010
2206
  }
2011
2207
 
2012
2208
  export declare interface ITraceTelemetry extends IPartC {
@@ -2030,16 +2226,12 @@ export declare interface ITraceTelemetry extends IPartC {
2030
2226
  iKey?: string;
2031
2227
  }
2032
2228
 
2033
- declare enum LoggingSeverity {
2034
- /**
2035
- * Error will be sent as internal telemetry
2036
- */
2037
- CRITICAL = 1,
2038
- /**
2039
- * Error will NOT be sent as internal telemetry, and will only be shown in browser console
2040
- */
2041
- WARNING = 2
2042
- }
2229
+ declare const LoggingSeverity: {
2230
+ CRITICAL: number;
2231
+ WARNING: number;
2232
+ };
2233
+
2234
+ declare type LoggingSeverity = number | eLoggingSeverity;
2043
2235
 
2044
2236
  export declare class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
2045
2237
  static constructEnvelope(orig: ITelemetryItem, iKey: string, logger: IDiagnosticLogger, convertUndefined?: any): IEnvelope;
@@ -2183,6 +2375,16 @@ declare interface Tags {
2183
2375
 
2184
2376
  declare type TelemetryInitializerFunction = <T extends ITelemetryItem>(item: T) => boolean | void;
2185
2377
 
2378
+ /**
2379
+ * The TelemetryUnloadReason enumeration contains the possible reasons for why a plugin is being unloaded / torndown().
2380
+ */
2381
+ declare const enum TelemetryUnloadReason {
2382
+ /**
2383
+ * Teardown has been called without any context.
2384
+ */
2385
+ ManualTeardown = 0
2386
+ }
2387
+
2186
2388
  declare interface XDomainRequest extends XMLHttpRequestEventTarget {
2187
2389
  readonly responseText: string;
2188
2390
  send(payload: string): void;
package/dist-esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript Web SDK - Basic, 2.8.0-beta.2203-01
2
+ * Application Insights JavaScript Web SDK - Basic, 2.8.0-beta.2203-02
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/applicationinsights-web-basic",
3
- "version": "2.8.0-beta.2203-01",
3
+ "version": "2.8.0-beta.2203-02",
4
4
  "description": "Microsoft Application Insights Javascript SDK core and channel",
5
5
  "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
6
6
  "author": "Microsoft Application Insights Team",
@@ -49,9 +49,9 @@
49
49
  "dependencies": {
50
50
  "@microsoft/dynamicproto-js": "^1.1.4",
51
51
  "@microsoft/applicationinsights-shims": "2.0.1",
52
- "@microsoft/applicationinsights-common": "2.8.0-beta.2203-01",
53
- "@microsoft/applicationinsights-channel-js": "2.8.0-beta.2203-01",
54
- "@microsoft/applicationinsights-core-js": "2.8.0-beta.2203-01"
52
+ "@microsoft/applicationinsights-common": "2.8.0-beta.2203-02",
53
+ "@microsoft/applicationinsights-channel-js": "2.8.0-beta.2203-02",
54
+ "@microsoft/applicationinsights-core-js": "2.8.0-beta.2203-02"
55
55
  },
56
56
  "license": "MIT",
57
57
  "publishConfig": {
@@ -1,26 +0,0 @@
1
- {
2
- "name": "aib",
3
- "version": "2.8.0-beta.2203-01",
4
- "ext": {
5
- "@js": {
6
- "file": "aib.2.8.0-beta.2203-01.js",
7
- "type": "text/javascript; charset=utf-8",
8
- "integrity": "sha256-bjvGunzh0Mm7dGuI5L88outjW8WhQvuh1EqPnL1lGNE= sha384-MUWN0uONE/Et/1SBGBR3O613/UuKgbfBMKDuckwh5yBB/vX950U3x8M+UM/2MzRg sha512-OmVnLXcmzdkshYoVFRZaWbPTRPql7qxz2NgGPIcE1Xzi5A5FlCExU9Yk7NP4Rl6hc4vT13aAAvh45+RNfPriCQ==",
9
- "hashes": {
10
- "sha256": "bjvGunzh0Mm7dGuI5L88outjW8WhQvuh1EqPnL1lGNE=",
11
- "sha384": "MUWN0uONE/Et/1SBGBR3O613/UuKgbfBMKDuckwh5yBB/vX950U3x8M+UM/2MzRg",
12
- "sha512": "OmVnLXcmzdkshYoVFRZaWbPTRPql7qxz2NgGPIcE1Xzi5A5FlCExU9Yk7NP4Rl6hc4vT13aAAvh45+RNfPriCQ=="
13
- }
14
- },
15
- "@min.js": {
16
- "file": "aib.2.8.0-beta.2203-01.min.js",
17
- "type": "text/javascript; charset=utf-8",
18
- "integrity": "sha256-GGY5bwbY71+l257QJGzcnjU/6HgcubcvdSt7Ua2/kyE= sha384-AZYcPoBcK/iFgBcrXNf9cQV67hCoyXK1uDC3BPcW7Vad0/VKZUST9oMGuTNqoyKZ sha512-lPgNb4oTCoreJBWgi6SPwuSHfzkszl1tVAl7F+vCV1b7FYHsNqkWDr1/ucLBqhZIosZVEcFE7l6b3XP1s/O46g==",
19
- "hashes": {
20
- "sha256": "GGY5bwbY71+l257QJGzcnjU/6HgcubcvdSt7Ua2/kyE=",
21
- "sha384": "AZYcPoBcK/iFgBcrXNf9cQV67hCoyXK1uDC3BPcW7Vad0/VKZUST9oMGuTNqoyKZ",
22
- "sha512": "lPgNb4oTCoreJBWgi6SPwuSHfzkszl1tVAl7F+vCV1b7FYHsNqkWDr1/ucLBqhZIosZVEcFE7l6b3XP1s/O46g=="
23
- }
24
- }
25
- }
26
- }