@microsoft/applicationinsights-core-js 3.0.0-beta.2302-05 → 3.0.0-beta.2302-06

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 (83) hide show
  1. package/README.md +2 -1
  2. package/browser/applicationinsights-core-js.integrity.json +9 -9
  3. package/browser/applicationinsights-core-js.js +59 -75
  4. package/browser/applicationinsights-core-js.js.map +1 -1
  5. package/browser/applicationinsights-core-js.min.js +2 -2
  6. package/browser/applicationinsights-core-js.min.js.map +1 -1
  7. package/dist/applicationinsights-core-js.api.json +57 -9
  8. package/dist/applicationinsights-core-js.api.md +3 -3
  9. package/dist/applicationinsights-core-js.d.ts +7 -4
  10. package/dist/applicationinsights-core-js.js +59 -75
  11. package/dist/applicationinsights-core-js.js.map +1 -1
  12. package/dist/applicationinsights-core-js.min.js +2 -2
  13. package/dist/applicationinsights-core-js.min.js.map +1 -1
  14. package/dist/applicationinsights-core-js.rollup.d.ts +7 -4
  15. package/dist-esm/Config/ConfigDefaultHelpers.js +1 -1
  16. package/dist-esm/Config/ConfigDefaults.js +1 -1
  17. package/dist-esm/Config/DynamicConfig.js +1 -1
  18. package/dist-esm/Config/DynamicProperty.js +1 -1
  19. package/dist-esm/Config/DynamicState.js +1 -1
  20. package/dist-esm/Config/DynamicSupport.js +1 -1
  21. package/dist-esm/Config/IConfigDefaults.js +1 -1
  22. package/dist-esm/Config/IDynamicConfigHandler.js +1 -1
  23. package/dist-esm/Config/IDynamicPropertyHandler.js +1 -1
  24. package/dist-esm/Config/IDynamicWatcher.js +1 -1
  25. package/dist-esm/Config/_IDynamicConfigHandlerState.js +1 -1
  26. package/dist-esm/JavaScriptSDK/AggregationError.js +1 -1
  27. package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
  28. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
  29. package/dist-esm/JavaScriptSDK/Constants.js +1 -1
  30. package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
  31. package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
  32. package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
  33. package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
  34. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
  35. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
  36. package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
  37. package/dist-esm/JavaScriptSDK/EventHelpers.js +1 -1
  38. package/dist-esm/JavaScriptSDK/HelperFuncs.js +1 -1
  39. package/dist-esm/JavaScriptSDK/InstrumentHooks.js +12 -9
  40. package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +1 -1
  41. package/dist-esm/JavaScriptSDK/InternalConstants.js +1 -1
  42. package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
  43. package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
  44. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
  45. package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
  46. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
  47. package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
  48. package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
  49. package/dist-esm/JavaScriptSDK/UnloadHookContainer.js +1 -1
  50. package/dist-esm/JavaScriptSDK/W3cTraceParent.js +1 -1
  51. package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
  52. package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  53. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  54. package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  55. package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
  56. package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
  57. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  58. package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  59. package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  60. package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  61. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
  62. package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  63. package/dist-esm/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
  64. package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  65. package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  66. package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  67. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  68. package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  69. package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  70. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
  71. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  72. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  73. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  74. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
  75. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
  76. package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
  77. package/dist-esm/JavaScriptSDK.Interfaces/IUnloadHook.js +1 -1
  78. package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
  79. package/dist-esm/__DynamicConstants.js +1 -1
  80. package/dist-esm/applicationinsights-core-js.js +1 -1
  81. package/package.json +1 -1
  82. package/src/JavaScriptSDK/InstrumentHooks.ts +11 -8
  83. package/types/JavaScriptSDK/InstrumentHooks.d.ts +6 -3
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-05
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-06
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, 3.0.0-beta.2302-05
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-06
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-05
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-06
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, 3.0.0-beta.2302-05
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-06
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, 3.0.0-beta.2302-05
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-06
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, 3.0.0-beta.2302-05
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-06
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, 3.0.0-beta.2302-05
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-06
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, 3.0.0-beta.2302-05
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-06
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, 3.0.0-beta.2302-05
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-06
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, 3.0.0-beta.2302-05
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-06
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, 3.0.0-beta.2302-05
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-06
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, 3.0.0-beta.2302-05
2
+ * Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-06
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export { MinChannelPriorty } from "./JavaScriptSDK.Interfaces/IChannelControls";
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": "3.0.0-beta.2302-05",
4
+ "version": "3.0.0-beta.2302-06",
5
5
  "description": "Microsoft Application Insights Core Javascript SDK",
6
6
  "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
7
7
  "keywords": [
@@ -131,13 +131,13 @@ function _createFunctionHook(aiHook:IInstrumentHooks) {
131
131
 
132
132
 
133
133
  /** @ignore */
134
- function _getOwner(target:any, name:string, checkPrototype: boolean): any {
134
+ function _getOwner(target:any, name:string, checkPrototype: boolean, checkParentProto: boolean): any {
135
135
  let owner = null;
136
136
  if (target) {
137
137
  if (objHasOwnProperty(target, name)) {
138
138
  owner = target;
139
139
  } else if (checkPrototype) {
140
- owner = _getOwner(_getObjProto(target), name, false);
140
+ owner = _getOwner(_getObjProto(target), name, checkParentProto, false);
141
141
  }
142
142
  }
143
143
 
@@ -219,10 +219,11 @@ function _createInstrumentHook(owner: any, funcName: string, fn: any, callbacks:
219
219
  * @param funcName - The function name
220
220
  * @param callbacks - The callbacks to configure and call whenever the function is called
221
221
  * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function
222
+ * @param checkParentProto - If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype
222
223
  */
223
- export function InstrumentFunc(target:any, funcName:string, callbacks: IInstrumentHooksCallbacks, checkPrototype:boolean = true): IInstrumentHook {
224
+ export function InstrumentFunc(target:any, funcName:string, callbacks: IInstrumentHooksCallbacks, checkPrototype: boolean = true, checkParentProto?: boolean): IInstrumentHook {
224
225
  if (target && funcName && callbacks) {
225
- let owner = _getOwner(target, funcName, checkPrototype);
226
+ let owner = _getOwner(target, funcName, checkPrototype, checkParentProto);
226
227
  if (owner) {
227
228
  let fn = owner[funcName]
228
229
  if (typeof fn === strShimFunction) {
@@ -240,11 +241,12 @@ export function InstrumentFunc(target:any, funcName:string, callbacks: IInstrume
240
241
  * @param funcNames - The function names to intercept and call
241
242
  * @param callbacks - The callbacks to configure and call whenever the function is called
242
243
  * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function
244
+ * @param checkParentProto - If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype
243
245
  */
244
- export function InstrumentFuncs(target:any, funcNames:string[], callbacks: IInstrumentHooksCallbacks, checkPrototype:boolean = true): IInstrumentHook[] {
246
+ export function InstrumentFuncs(target:any, funcNames:string[], callbacks: IInstrumentHooksCallbacks, checkPrototype:boolean = true, checkParentProto?: boolean): IInstrumentHook[] {
245
247
  let hooks: IInstrumentHook[] = null;
246
248
  _arrLoop(funcNames, (funcName) => {
247
- let hook = InstrumentFunc(target, funcName, callbacks, checkPrototype);
249
+ let hook = InstrumentFunc(target, funcName, callbacks, checkPrototype, checkParentProto);
248
250
  if (hook) {
249
251
  if (!hooks) {
250
252
  hooks = [];
@@ -264,10 +266,11 @@ export function InstrumentFuncs(target:any, funcNames:string[], callbacks: IInst
264
266
  * @param evtName - The name of the event
265
267
  * @param callbacks - The callbacks to configure and call whenever the function is called
266
268
  * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function
269
+ * @param checkParentProto - If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype
267
270
  */
268
- export function InstrumentEvent(target: any, evtName: string, callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean): IInstrumentHook {
271
+ export function InstrumentEvent(target: any, evtName: string, callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean, checkParentProto?: boolean): IInstrumentHook {
269
272
  if (target && evtName && callbacks) {
270
- let owner = _getOwner(target, evtName, checkPrototype) || target;
273
+ let owner = _getOwner(target, evtName, checkPrototype, checkParentProto) || target;
271
274
  if (owner) {
272
275
  return _createInstrumentHook(owner, evtName, owner[evtName], callbacks);
273
276
  }
@@ -19,16 +19,18 @@ export declare function InstrumentProtos(target: any, funcNames: string[], callb
19
19
  * @param funcName - The function name
20
20
  * @param callbacks - The callbacks to configure and call whenever the function is called
21
21
  * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function
22
+ * @param checkParentProto - If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype
22
23
  */
23
- export declare function InstrumentFunc(target: any, funcName: string, callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean): IInstrumentHook;
24
+ export declare function InstrumentFunc(target: any, funcName: string, callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean, checkParentProto?: boolean): IInstrumentHook;
24
25
  /**
25
26
  * Intercept the named functions for the target class / object
26
27
  * @param target - The target object
27
28
  * @param funcNames - The function names to intercept and call
28
29
  * @param callbacks - The callbacks to configure and call whenever the function is called
29
30
  * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function
31
+ * @param checkParentProto - If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype
30
32
  */
31
- export declare function InstrumentFuncs(target: any, funcNames: string[], callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean): IInstrumentHook[];
33
+ export declare function InstrumentFuncs(target: any, funcNames: string[], callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean, checkParentProto?: boolean): IInstrumentHook[];
32
34
  /**
33
35
  * Add an instrumentation hook to the provided named "event" for the target class / object, this doesn't check whether the
34
36
  * named "event" is in fact a function and just assigns the instrumentation hook to the target[evtName]
@@ -36,5 +38,6 @@ export declare function InstrumentFuncs(target: any, funcNames: string[], callba
36
38
  * @param evtName - The name of the event
37
39
  * @param callbacks - The callbacks to configure and call whenever the function is called
38
40
  * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function
41
+ * @param checkParentProto - If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype
39
42
  */
40
- export declare function InstrumentEvent(target: any, evtName: string, callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean): IInstrumentHook;
43
+ export declare function InstrumentEvent(target: any, evtName: string, callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean, checkParentProto?: boolean): IInstrumentHook;