@microsoft/applicationinsights-core-js 2.7.2-nightly.2111-10 → 2.7.2-nightly.2111-15

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.
Files changed (68) hide show
  1. package/browser/applicationinsights-core-js.integrity.json +9 -9
  2. package/browser/applicationinsights-core-js.js +63 -2
  3. package/browser/applicationinsights-core-js.js.map +1 -1
  4. package/browser/applicationinsights-core-js.min.js +2 -2
  5. package/browser/applicationinsights-core-js.min.js.map +1 -1
  6. package/dist/applicationinsights-core-js.api.json +315 -0
  7. package/dist/applicationinsights-core-js.api.md +25 -0
  8. package/dist/applicationinsights-core-js.d.ts +20 -1
  9. package/dist/applicationinsights-core-js.js +63 -2
  10. package/dist/applicationinsights-core-js.js.map +1 -1
  11. package/dist/applicationinsights-core-js.min.js +2 -2
  12. package/dist/applicationinsights-core-js.min.js.map +1 -1
  13. package/dist/applicationinsights-core-js.rollup.d.ts +20 -1
  14. package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
  15. package/dist-esm/JavaScriptSDK/BaseCore.js +5 -1
  16. package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
  17. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
  18. package/dist-esm/JavaScriptSDK/ChannelController.js +1 -1
  19. package/dist-esm/JavaScriptSDK/Constants.js +1 -1
  20. package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
  21. package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
  22. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +47 -0
  23. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js.map +1 -0
  24. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +20 -2
  25. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
  26. package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
  27. package/dist-esm/JavaScriptSDK/HelperFuncs.js +1 -1
  28. package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
  29. package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
  30. package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
  31. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
  32. package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
  33. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
  34. package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js +1 -1
  35. package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  36. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  37. package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  38. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  39. package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  40. package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  41. package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  42. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +8 -0
  43. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js.map +1 -0
  44. package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  45. package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  46. package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  47. package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  48. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +3 -1
  49. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js.map +1 -1
  50. package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  51. package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  52. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  53. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  54. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  55. package/dist-esm/applicationinsights-core-js.js +2 -1
  56. package/dist-esm/applicationinsights-core-js.js.map +1 -1
  57. package/package.json +1 -1
  58. package/src/JavaScriptSDK/BaseCore.ts +5 -0
  59. package/src/JavaScriptSDK/DbgExtensionUtils.ts +55 -0
  60. package/src/JavaScriptSDK/DiagnosticLogger.ts +18 -1
  61. package/src/JavaScriptSDK.Interfaces/IConfiguration.ts +6 -0
  62. package/src/JavaScriptSDK.Interfaces/IDbgExtension.ts +14 -0
  63. package/src/JavaScriptSDK.Interfaces/IPerfEvent.ts +0 -1
  64. package/src/JavaScriptSDK.Interfaces/IPerfManager.ts +0 -1
  65. package/types/JavaScriptSDK/DbgExtensionUtils.d.ts +5 -0
  66. package/types/JavaScriptSDK.Interfaces/IConfiguration.d.ts +5 -0
  67. package/types/JavaScriptSDK.Interfaces/IDbgExtension.d.ts +10 -0
  68. package/types/applicationinsights-core-js.d.ts +2 -0
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-10
2
+ * Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-15
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-10
2
+ * Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-15
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export { MinChannelPriorty } from "./JavaScriptSDK.Interfaces/IChannelControls";
@@ -21,4 +21,5 @@ export { _InternalMessageId, LoggingSeverity } from "./JavaScriptSDK.Enums/Loggi
21
21
  export { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs } from "./JavaScriptSDK/InstrumentHooks";
22
22
  export { createCookieMgr, safeGetCookieMgr, uaDisallowsSameSiteNone, areCookiesSupported } from "./JavaScriptSDK/CookieMgr";
23
23
  export { strIKey, strExtensionConfig } from "./JavaScriptSDK/Constants";
24
+ export { getDebugListener, getDebugExt } from "./JavaScriptSDK/DbgExtensionUtils";
24
25
  //# sourceMappingURL=applicationinsights-core-js.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"applicationinsights-core-js.js.map","sources":["applicationinsights-core-js.js"],"sourcesContent":["export { MinChannelPriorty } from \"./JavaScriptSDK.Interfaces/IChannelControls\";\r\nexport { EventsDiscardedReason } from \"./JavaScriptSDK.Enums/EventsDiscardedReason\";\r\nexport { AppInsightsCore } from \"./JavaScriptSDK/AppInsightsCore\";\r\nexport { BaseCore } from \"./JavaScriptSDK/BaseCore\";\r\nexport { BaseTelemetryPlugin } from \"./JavaScriptSDK/BaseTelemetryPlugin\";\r\nexport { randomValue, random32, mwcRandomSeed, mwcRandom32 } from \"./JavaScriptSDK/RandomHelper\";\r\nexport { CoreUtils, EventHelper, Undefined, addEventHandler, newGuid, perfNow, newId, generateW3CId, disableCookies, canUseCookies, getCookie, setCookie, deleteCookie, _legacyCookieMgr, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener } from \"./JavaScriptSDK/CoreUtils\";\r\nexport { isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, attachEvent, detachEvent, normalizeJsName, objForEachKey, strEndsWith, strStartsWith, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, strTrim, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, strContains, isSymbol, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objFreeze, objSeal } from \"./JavaScriptSDK/HelperFuncs\";\r\nexport { getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto, hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, dumpObj, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported } from \"./JavaScriptSDK/EnvUtils\";\r\nexport { getGlobal, objCreateFn as objCreate, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from \"@microsoft/applicationinsights-shims\";\r\nexport { NotificationManager } from \"./JavaScriptSDK/NotificationManager\";\r\nexport { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from \"./JavaScriptSDK/PerfManager\";\r\nexport { safeGetLogger, DiagnosticLogger, _InternalLogMessage } from \"./JavaScriptSDK/DiagnosticLogger\";\r\nexport { ProcessTelemetryContext } from \"./JavaScriptSDK/ProcessTelemetryContext\";\r\nexport { initializePlugins, sortPlugins } from \"./JavaScriptSDK/TelemetryHelpers\";\r\nexport { _InternalMessageId, LoggingSeverity } from \"./JavaScriptSDK.Enums/LoggingEnums\";\r\nexport { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs } from \"./JavaScriptSDK/InstrumentHooks\";\r\nexport { createCookieMgr, safeGetCookieMgr, uaDisallowsSameSiteNone, areCookiesSupported } from \"./JavaScriptSDK/CookieMgr\";\r\nexport { strIKey, strExtensionConfig } from \"./JavaScriptSDK/Constants\";\r\n//# sourceMappingURL=applicationinsights-core-js.js.map"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"applicationinsights-core-js.js.map","sources":["applicationinsights-core-js.js"],"sourcesContent":["export { MinChannelPriorty } from \"./JavaScriptSDK.Interfaces/IChannelControls\";\r\nexport { EventsDiscardedReason } from \"./JavaScriptSDK.Enums/EventsDiscardedReason\";\r\nexport { AppInsightsCore } from \"./JavaScriptSDK/AppInsightsCore\";\r\nexport { BaseCore } from \"./JavaScriptSDK/BaseCore\";\r\nexport { BaseTelemetryPlugin } from \"./JavaScriptSDK/BaseTelemetryPlugin\";\r\nexport { randomValue, random32, mwcRandomSeed, mwcRandom32 } from \"./JavaScriptSDK/RandomHelper\";\r\nexport { CoreUtils, EventHelper, Undefined, addEventHandler, newGuid, perfNow, newId, generateW3CId, disableCookies, canUseCookies, getCookie, setCookie, deleteCookie, _legacyCookieMgr, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener } from \"./JavaScriptSDK/CoreUtils\";\r\nexport { isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, attachEvent, detachEvent, normalizeJsName, objForEachKey, strEndsWith, strStartsWith, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, strTrim, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, strContains, isSymbol, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objFreeze, objSeal } from \"./JavaScriptSDK/HelperFuncs\";\r\nexport { getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto, hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, dumpObj, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported } from \"./JavaScriptSDK/EnvUtils\";\r\nexport { getGlobal, objCreateFn as objCreate, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from \"@microsoft/applicationinsights-shims\";\r\nexport { NotificationManager } from \"./JavaScriptSDK/NotificationManager\";\r\nexport { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from \"./JavaScriptSDK/PerfManager\";\r\nexport { safeGetLogger, DiagnosticLogger, _InternalLogMessage } from \"./JavaScriptSDK/DiagnosticLogger\";\r\nexport { ProcessTelemetryContext } from \"./JavaScriptSDK/ProcessTelemetryContext\";\r\nexport { initializePlugins, sortPlugins } from \"./JavaScriptSDK/TelemetryHelpers\";\r\nexport { _InternalMessageId, LoggingSeverity } from \"./JavaScriptSDK.Enums/LoggingEnums\";\r\nexport { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs } from \"./JavaScriptSDK/InstrumentHooks\";\r\nexport { createCookieMgr, safeGetCookieMgr, uaDisallowsSameSiteNone, areCookiesSupported } from \"./JavaScriptSDK/CookieMgr\";\r\nexport { strIKey, strExtensionConfig } from \"./JavaScriptSDK/Constants\";\r\nexport { getDebugListener, getDebugExt } from \"./JavaScriptSDK/DbgExtensionUtils\";\r\n//# sourceMappingURL=applicationinsights-core-js.js.map"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@microsoft/applicationinsights-core-js",
3
3
  "author": "Microsoft Application Insights Team",
4
- "version": "2.7.2-nightly.2111-10",
4
+ "version": "2.7.2-nightly.2111-15",
5
5
  "description": "Microsoft Application Insights Core Javascript SDK",
6
6
  "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
7
7
  "keywords": [
@@ -24,6 +24,7 @@ import { createCookieMgr } from "./CookieMgr";
24
24
  import { arrForEach, isNullOrUndefined, toISOString, getSetValue, setValue, throwError, isNotTruthy, isFunction } from "./HelperFuncs";
25
25
  import { strExtensionConfig, strIKey } from "./Constants";
26
26
  import { DiagnosticLogger } from "./DiagnosticLogger";
27
+ import { getDebugListener } from "./DbgExtensionUtils";
27
28
 
28
29
  const validationError = "Extensions must provide callback to initialize";
29
30
 
@@ -79,6 +80,10 @@ export class BaseCore implements IAppInsightsCore {
79
80
  _self[strNotificationManager] = notificationManager;
80
81
  _self.config = config || {};
81
82
 
83
+ if (notificationManager && _self.config.disableDbgExt !== true) {
84
+ notificationManager.addNotificationListener(getDebugListener(config));
85
+ }
86
+
82
87
  if (_self.config.enablePerfMgr) {
83
88
  // Set the performance manager creation function if not defined
84
89
  setValue(_self.config, "createPerfMgr", _createPerfManager);
@@ -0,0 +1,55 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
3
+
4
+ import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
5
+ import { IDbgExtension } from "../JavaScriptSDK.Interfaces/IDbgExtension";
6
+ import { INotificationListener } from "../JavaScriptSDK.Interfaces/INotificationListener";
7
+ import { getGlobalInst } from "./EnvUtils";
8
+
9
+ const listenerFuncs = [ "eventsSent", "eventsDiscarded", "eventsSendRequest", "perfEvent" ];
10
+
11
+ let _aiNamespace: any = null;
12
+ let _debugListener: INotificationListener;
13
+
14
+ function _listenerProxyFunc(name: string, config: IConfiguration) {
15
+ return function() {
16
+ let args = arguments;
17
+ let dbgExt = getDebugExt(config);
18
+ if (dbgExt) {
19
+ let listener = dbgExt.listener;
20
+ if (listener && listener[name]) {
21
+ listener[name].apply(listener, args);
22
+ }
23
+ }
24
+ }
25
+ }
26
+
27
+ function _getExtensionNamespace() {
28
+ // Cache the lookup of the global namespace object
29
+ let target = getGlobalInst("Microsoft");
30
+ if (target) {
31
+ _aiNamespace = target["ApplicationInsights"];
32
+ }
33
+
34
+ return _aiNamespace;
35
+ }
36
+
37
+ export function getDebugExt(config: IConfiguration): IDbgExtension {
38
+ let ns = _aiNamespace;
39
+ if (!ns && config.disableDbgExt !== true) {
40
+ ns = _aiNamespace || _getExtensionNamespace();
41
+ }
42
+
43
+ return ns ? ns["ChromeDbgExt"] : null;
44
+ }
45
+
46
+ export function getDebugListener(config: IConfiguration): INotificationListener {
47
+ if (!_debugListener) {
48
+ _debugListener = {};
49
+ for (let lp = 0; lp < listenerFuncs.length; lp++) {
50
+ _debugListener[listenerFuncs[lp]] = _listenerProxyFunc(listenerFuncs[lp], config);
51
+ }
52
+ }
53
+
54
+ return _debugListener;
55
+ }
@@ -8,6 +8,7 @@ import { hasJSON, getJSON, getConsole } from "./EnvUtils";
8
8
  import dynamicProto from "@microsoft/dynamicproto-js";
9
9
  import { isFunction, isNullOrUndefined, isUndefined } from "./HelperFuncs";
10
10
  import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
11
+ import { getDebugExt } from "./DbgExtensionUtils";
11
12
 
12
13
  /**
13
14
  * For user non actionable traces use AI Internal prefix.
@@ -144,6 +145,8 @@ export class DiagnosticLogger implements IDiagnosticLogger {
144
145
  }
145
146
 
146
147
  _self.logInternalMessage(severity, message);
148
+ } else {
149
+ _debugExtMsg("throw" + (severity === LoggingSeverity.CRITICAL ? "Critical" : "Warning"), message);
147
150
  }
148
151
  }
149
152
  }
@@ -154,6 +157,7 @@ export class DiagnosticLogger implements IDiagnosticLogger {
154
157
  */
155
158
  _self.warnToConsole = (message: string) => {
156
159
  _logToConsole("warn", message);
160
+ _debugExtMsg("warning", message);
157
161
  }
158
162
 
159
163
  /**
@@ -162,6 +166,7 @@ export class DiagnosticLogger implements IDiagnosticLogger {
162
166
  */
163
167
  _self.errorToConsole = (message: string) => {
164
168
  _logToConsole("error", message);
169
+ _debugExtMsg("error", message);
165
170
  }
166
171
 
167
172
  /**
@@ -198,6 +203,7 @@ export class DiagnosticLogger implements IDiagnosticLogger {
198
203
  if (severity <= _self.telemetryLoggingLevel()) {
199
204
  _self.queue.push(message);
200
205
  _messageCount++;
206
+ _debugExtMsg((severity === LoggingSeverity.CRITICAL ? "error" : "warn"), message);
201
207
  }
202
208
 
203
209
  // When throttle limit reached, send a special event
@@ -205,7 +211,11 @@ export class DiagnosticLogger implements IDiagnosticLogger {
205
211
  const throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
206
212
  const throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);
207
213
  _self.queue.push(throttleMessage);
208
- _self.warnToConsole(throttleLimitMessage);
214
+ if (severity === LoggingSeverity.CRITICAL) {
215
+ _self.errorToConsole(throttleLimitMessage);
216
+ } else {
217
+ _self.warnToConsole(throttleLimitMessage);
218
+ }
209
219
  }
210
220
  }
211
221
  };
@@ -222,6 +232,13 @@ export class DiagnosticLogger implements IDiagnosticLogger {
222
232
  function _areInternalMessagesThrottled(): boolean {
223
233
  return _messageCount >= _self.maxInternalMessageLimit();
224
234
  }
235
+
236
+ function _debugExtMsg(name: string, data: any) {
237
+ let dbgExt = getDebugExt(config);
238
+ if (dbgExt && dbgExt.diagLog) {
239
+ dbgExt.diagLog(name, data);
240
+ }
241
+ }
225
242
  });
226
243
  }
227
244
 
@@ -163,4 +163,10 @@ export interface IConfiguration {
163
163
  * Page Show events include "pageshow" and "visibilitychange" (with 'visible' state)
164
164
  */
165
165
  disablePageShowEvents?: string[];
166
+
167
+ /**
168
+ * [Optional] A flag for performance optimization to disable attempting to use the Chrome Debug Extension, if disabled and the extension is installed
169
+ * this will not send any notifications.
170
+ */
171
+ disableDbgExt?: boolean;
166
172
  }
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
3
+
4
+ import { INotificationListener } from "./INotificationListener";
5
+
6
+ export interface IDbgExtension {
7
+ isEnabled: () => boolean;
8
+ enable: () => void;
9
+ disable: () => void;
10
+ listener: INotificationListener,
11
+ sendEvt?: (name: string, data: any) => void;
12
+ debugMsg?: (name: string, data: any) => void;
13
+ diagLog?: (name: string, data: any) => void;
14
+ }
@@ -1,6 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation. All rights reserved.
2
2
  // Licensed under the MIT License.
3
- import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
4
3
 
5
4
  /**
6
5
  * This interface identifies the details of an internal performance event - it does not represent an outgoing reported event
@@ -1,6 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation. All rights reserved.
2
2
  // Licensed under the MIT License.
3
- import { ITelemetryItem } from "../JavaScriptSDK.Interfaces/ITelemetryItem";
4
3
  import { IPerfEvent } from "./../JavaScriptSDK.Interfaces/IPerfEvent";
5
4
 
6
5
  /**
@@ -0,0 +1,5 @@
1
+ import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
2
+ import { IDbgExtension } from "../JavaScriptSDK.Interfaces/IDbgExtension";
3
+ import { INotificationListener } from "../JavaScriptSDK.Interfaces/INotificationListener";
4
+ export declare function getDebugExt(config: IConfiguration): IDbgExtension;
5
+ export declare function getDebugListener(config: IConfiguration): INotificationListener;
@@ -140,4 +140,9 @@ export interface IConfiguration {
140
140
  * Page Show events include "pageshow" and "visibilitychange" (with 'visible' state)
141
141
  */
142
142
  disablePageShowEvents?: string[];
143
+ /**
144
+ * [Optional] A flag for performance optimization to disable attempting to use the Chrome Debug Extension, if disabled and the extension is installed
145
+ * this will not send any notifications.
146
+ */
147
+ disableDbgExt?: boolean;
143
148
  }
@@ -0,0 +1,10 @@
1
+ import { INotificationListener } from "./INotificationListener";
2
+ export interface IDbgExtension {
3
+ isEnabled: () => boolean;
4
+ enable: () => void;
5
+ disable: () => void;
6
+ listener: INotificationListener;
7
+ sendEvt?: (name: string, data: any) => void;
8
+ debugMsg?: (name: string, data: any) => void;
9
+ diagLog?: (name: string, data: any) => void;
10
+ }
@@ -31,3 +31,5 @@ export { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs } fr
31
31
  export { ICookieMgr, ICookieMgrConfig } from "./JavaScriptSDK.Interfaces/ICookieMgr";
32
32
  export { createCookieMgr, safeGetCookieMgr, uaDisallowsSameSiteNone, areCookiesSupported } from "./JavaScriptSDK/CookieMgr";
33
33
  export { strIKey, strExtensionConfig } from "./JavaScriptSDK/Constants";
34
+ export { IDbgExtension } from "./JavaScriptSDK.Interfaces/IDbgExtension";
35
+ export { getDebugListener, getDebugExt } from "./JavaScriptSDK/DbgExtensionUtils";