@microsoft/applicationinsights-core-js 3.0.0-beta.2302-05 → 3.0.0-beta.2303-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.
- package/README.md +2 -1
- package/browser/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +141 -111
- 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 +57 -9
- package/dist/applicationinsights-core-js.api.md +3 -3
- package/dist/applicationinsights-core-js.d.ts +7 -4
- package/dist/applicationinsights-core-js.js +141 -111
- 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 +7 -4
- package/dist-esm/Config/ConfigDefaultHelpers.js +1 -1
- package/dist-esm/Config/ConfigDefaults.js +1 -1
- package/dist-esm/Config/DynamicConfig.js +1 -1
- package/dist-esm/Config/DynamicProperty.js +1 -1
- package/dist-esm/Config/DynamicState.js +1 -1
- package/dist-esm/Config/DynamicSupport.js +1 -1
- package/dist-esm/Config/IConfigDefaults.js +1 -1
- package/dist-esm/Config/IDynamicConfigHandler.js +1 -1
- package/dist-esm/Config/IDynamicPropertyHandler.js +1 -1
- package/dist-esm/Config/IDynamicWatcher.js +1 -1
- package/dist-esm/Config/_IDynamicConfigHandlerState.js +1 -1
- package/dist-esm/JavaScriptSDK/AggregationError.js +1 -1
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.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 +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +12 -9
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +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/UnloadHookContainer.js +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +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/IDistributedTraceContext.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/ITraceParent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadHook.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
- package/dist-esm/__DynamicConstants.js +1 -1
- package/dist-esm/applicationinsights-core-js.js +1 -1
- package/package.json +2 -2
- package/src/JavaScriptSDK/InstrumentHooks.ts +11 -8
- package/types/JavaScriptSDK/InstrumentHooks.d.ts +6 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 3.0.0-beta.
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 3.0.0-beta.2303-02
|
|
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.
|
|
4
|
+
"version": "3.0.0-beta.2303-02",
|
|
5
5
|
"description": "Microsoft Application Insights Core Javascript SDK",
|
|
6
6
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
7
7
|
"keywords": [
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@microsoft/applicationinsights-shims": "2.0.2",
|
|
68
68
|
"@microsoft/dynamicproto-js": "^1.1.7",
|
|
69
|
-
"@nevware21/ts-utils": ">= 0.
|
|
69
|
+
"@nevware21/ts-utils": ">= 0.8.1 < 2.x"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"tag": "beta"
|
|
@@ -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;
|