@microsoft/applicationinsights-core-js 2.8.1-nightly.2204-21 → 2.8.2-nightly.2204-24
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 +64 -44
- 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 +95 -1
- package/dist/applicationinsights-core-js.api.md +3 -0
- package/dist/applicationinsights-core-js.d.ts +11 -1
- package/dist/applicationinsights-core-js.js +64 -44
- 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 +11 -1
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +5 -5
- 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 +3 -3
- 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 +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +66 -44
- 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.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/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 +2 -2
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +2 -2
- package/src/JavaScriptSDK/BaseCore.ts +5 -4
- package/src/JavaScriptSDK/DataCacheHelper.ts +1 -1
- package/src/JavaScriptSDK/DiagnosticLogger.ts +2 -2
- package/src/JavaScriptSDK/InstrumentHooks.ts +75 -48
- package/types/JavaScriptSDK/InstrumentHooks.d.ts +9 -0
- package/types/applicationinsights-core-js.d.ts +1 -1
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
-
"toolVersion": "7.
|
|
4
|
+
"toolVersion": "7.23.0",
|
|
5
5
|
"schemaVersion": 1005,
|
|
6
6
|
"oldestForwardsCompatibleVersion": 1001,
|
|
7
7
|
"tsdocConfig": {
|
|
@@ -15343,6 +15343,100 @@
|
|
|
15343
15343
|
],
|
|
15344
15344
|
"extendsTokenRanges": []
|
|
15345
15345
|
},
|
|
15346
|
+
{
|
|
15347
|
+
"kind": "Function",
|
|
15348
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!InstrumentEvent:function(1)",
|
|
15349
|
+
"docComment": "/**\n * Add an instrumentation hook to the provided named \"event\" for the target class / object, this doesn't check whether the named \"event\" is in fact a function and just assigns the instrumentation hook to the target[evtName]\n *\n * @param target - The target object\n *\n * @param evtName - The name of the event\n *\n * @param callbacks - The callbacks to configure and call whenever the function is called\n *\n * @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function\n */\n",
|
|
15350
|
+
"excerptTokens": [
|
|
15351
|
+
{
|
|
15352
|
+
"kind": "Content",
|
|
15353
|
+
"text": "export declare function InstrumentEvent(target: "
|
|
15354
|
+
},
|
|
15355
|
+
{
|
|
15356
|
+
"kind": "Content",
|
|
15357
|
+
"text": "any"
|
|
15358
|
+
},
|
|
15359
|
+
{
|
|
15360
|
+
"kind": "Content",
|
|
15361
|
+
"text": ", evtName: "
|
|
15362
|
+
},
|
|
15363
|
+
{
|
|
15364
|
+
"kind": "Content",
|
|
15365
|
+
"text": "string"
|
|
15366
|
+
},
|
|
15367
|
+
{
|
|
15368
|
+
"kind": "Content",
|
|
15369
|
+
"text": ", callbacks: "
|
|
15370
|
+
},
|
|
15371
|
+
{
|
|
15372
|
+
"kind": "Reference",
|
|
15373
|
+
"text": "IInstrumentHooksCallbacks",
|
|
15374
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!IInstrumentHooksCallbacks:interface"
|
|
15375
|
+
},
|
|
15376
|
+
{
|
|
15377
|
+
"kind": "Content",
|
|
15378
|
+
"text": ", checkPrototype?: "
|
|
15379
|
+
},
|
|
15380
|
+
{
|
|
15381
|
+
"kind": "Content",
|
|
15382
|
+
"text": "boolean"
|
|
15383
|
+
},
|
|
15384
|
+
{
|
|
15385
|
+
"kind": "Content",
|
|
15386
|
+
"text": "): "
|
|
15387
|
+
},
|
|
15388
|
+
{
|
|
15389
|
+
"kind": "Reference",
|
|
15390
|
+
"text": "IInstrumentHook",
|
|
15391
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!IInstrumentHook:interface"
|
|
15392
|
+
},
|
|
15393
|
+
{
|
|
15394
|
+
"kind": "Content",
|
|
15395
|
+
"text": ";"
|
|
15396
|
+
}
|
|
15397
|
+
],
|
|
15398
|
+
"returnTypeTokenRange": {
|
|
15399
|
+
"startIndex": 9,
|
|
15400
|
+
"endIndex": 10
|
|
15401
|
+
},
|
|
15402
|
+
"releaseTag": "Public",
|
|
15403
|
+
"overloadIndex": 1,
|
|
15404
|
+
"parameters": [
|
|
15405
|
+
{
|
|
15406
|
+
"parameterName": "target",
|
|
15407
|
+
"parameterTypeTokenRange": {
|
|
15408
|
+
"startIndex": 1,
|
|
15409
|
+
"endIndex": 2
|
|
15410
|
+
},
|
|
15411
|
+
"isOptional": false
|
|
15412
|
+
},
|
|
15413
|
+
{
|
|
15414
|
+
"parameterName": "evtName",
|
|
15415
|
+
"parameterTypeTokenRange": {
|
|
15416
|
+
"startIndex": 3,
|
|
15417
|
+
"endIndex": 4
|
|
15418
|
+
},
|
|
15419
|
+
"isOptional": false
|
|
15420
|
+
},
|
|
15421
|
+
{
|
|
15422
|
+
"parameterName": "callbacks",
|
|
15423
|
+
"parameterTypeTokenRange": {
|
|
15424
|
+
"startIndex": 5,
|
|
15425
|
+
"endIndex": 6
|
|
15426
|
+
},
|
|
15427
|
+
"isOptional": false
|
|
15428
|
+
},
|
|
15429
|
+
{
|
|
15430
|
+
"parameterName": "checkPrototype",
|
|
15431
|
+
"parameterTypeTokenRange": {
|
|
15432
|
+
"startIndex": 7,
|
|
15433
|
+
"endIndex": 8
|
|
15434
|
+
},
|
|
15435
|
+
"isOptional": true
|
|
15436
|
+
}
|
|
15437
|
+
],
|
|
15438
|
+
"name": "InstrumentEvent"
|
|
15439
|
+
},
|
|
15346
15440
|
{
|
|
15347
15441
|
"kind": "Function",
|
|
15348
15442
|
"canonicalReference": "@microsoft/applicationinsights-core-js!InstrumentFunc:function(1)",
|
|
@@ -776,6 +776,9 @@ export interface INotificationManager {
|
|
|
776
776
|
removeNotificationListener(listener: INotificationListener): void;
|
|
777
777
|
}
|
|
778
778
|
|
|
779
|
+
// @public
|
|
780
|
+
export function InstrumentEvent(target: any, evtName: string, callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean): IInstrumentHook;
|
|
781
|
+
|
|
779
782
|
// @public
|
|
780
783
|
export function InstrumentFunc(target: any, funcName: string, callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean): IInstrumentHook;
|
|
781
784
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 2.8.
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 2.8.2-nightly.2204-24
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -1722,6 +1722,16 @@ declare namespace ApplicationInsights {
|
|
|
1722
1722
|
perfEvent?(perfEvent: IPerfEvent): void;
|
|
1723
1723
|
}
|
|
1724
1724
|
|
|
1725
|
+
/**
|
|
1726
|
+
* Add an instrumentation hook to the provided named "event" for the target class / object, this doesn't check whether the
|
|
1727
|
+
* named "event" is in fact a function and just assigns the instrumentation hook to the target[evtName]
|
|
1728
|
+
* @param target - The target object
|
|
1729
|
+
* @param evtName - The name of the event
|
|
1730
|
+
* @param callbacks - The callbacks to configure and call whenever the function is called
|
|
1731
|
+
* @param checkPrototype - If the function doesn't exist on the target should it attempt to hook the prototype function
|
|
1732
|
+
*/
|
|
1733
|
+
function InstrumentEvent(target: any, evtName: string, callbacks: IInstrumentHooksCallbacks, checkPrototype?: boolean): IInstrumentHook;
|
|
1734
|
+
|
|
1725
1735
|
/**
|
|
1726
1736
|
* Intercept the named prototype functions for the target class / object
|
|
1727
1737
|
* @param target - The target object
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 2.8.
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 2.8.2-nightly.2204-24
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -680,7 +680,7 @@
|
|
|
680
680
|
});
|
|
681
681
|
|
|
682
682
|
/*!
|
|
683
|
-
* Microsoft Dynamic Proto Utility, 1.1.
|
|
683
|
+
* Microsoft Dynamic Proto Utility, 1.1.5
|
|
684
684
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
685
685
|
*/
|
|
686
686
|
var Constructor = 'constructor';
|
|
@@ -693,6 +693,7 @@
|
|
|
693
693
|
var DynInstChkTag = '_dynInstChk';
|
|
694
694
|
var DynAllowInstChkTag = DynInstChkTag;
|
|
695
695
|
var DynProtoDefaultOptions = '_dfOpts';
|
|
696
|
+
var DynProtoPolyProto = "_dynProto";
|
|
696
697
|
var UnknownValue = '_unknown_';
|
|
697
698
|
var str__Proto = "__proto__";
|
|
698
699
|
var strUseBaseInst = 'useBaseInst';
|
|
@@ -714,8 +715,11 @@
|
|
|
714
715
|
if (_objGetPrototypeOf) {
|
|
715
716
|
return _objGetPrototypeOf(target);
|
|
716
717
|
}
|
|
717
|
-
var newProto = target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
|
|
718
|
+
var newProto = target[DynProtoPolyProto] || target[str__Proto] || target[Prototype] || (target[Constructor] ? target[Constructor][Prototype] : null);
|
|
718
719
|
if (newProto) {
|
|
720
|
+
if (!target[DynProtoPolyProto]) {
|
|
721
|
+
target[DynProtoPolyProto] = newProto;
|
|
722
|
+
}
|
|
719
723
|
return newProto;
|
|
720
724
|
}
|
|
721
725
|
}
|
|
@@ -874,8 +878,9 @@
|
|
|
874
878
|
visited.push(thisProto);
|
|
875
879
|
thisProto = _getObjProto(thisProto);
|
|
876
880
|
}
|
|
881
|
+
return false;
|
|
877
882
|
}
|
|
878
|
-
return
|
|
883
|
+
return true;
|
|
879
884
|
}
|
|
880
885
|
function _getObjName(target, unknownValue) {
|
|
881
886
|
if (_hasOwnProperty(target, Prototype)) {
|
|
@@ -1245,7 +1250,7 @@
|
|
|
1245
1250
|
if (isUserAct === void 0) { isUserAct = false; }
|
|
1246
1251
|
var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
|
|
1247
1252
|
if (_self.enableDebugExceptions()) {
|
|
1248
|
-
throw message;
|
|
1253
|
+
throw dumpObj(message);
|
|
1249
1254
|
}
|
|
1250
1255
|
else {
|
|
1251
1256
|
var logFunc = severity === 1 ? strErrorToConsole : strWarnToConsole;
|
|
@@ -1577,7 +1582,7 @@
|
|
|
1577
1582
|
}
|
|
1578
1583
|
|
|
1579
1584
|
var _objDefineProperty = ObjDefineProperty;
|
|
1580
|
-
var version = "2.8.
|
|
1585
|
+
var version = "2.8.2-nightly.2204-24";
|
|
1581
1586
|
var instanceName = "." + newId(6);
|
|
1582
1587
|
var _dataUid = 0;
|
|
1583
1588
|
function _createAccessor(target, prop, value) {
|
|
@@ -3069,11 +3074,11 @@
|
|
|
3069
3074
|
var allExtensions = theExtensions.all;
|
|
3070
3075
|
_channelQueue = objFreeze(createChannelQueues(_channelConfig, allExtensions, config, _self));
|
|
3071
3076
|
if (_channelControl) {
|
|
3072
|
-
var idx = allExtensions
|
|
3077
|
+
var idx = arrIndexOf(allExtensions, _channelControl);
|
|
3073
3078
|
if (idx !== -1) {
|
|
3074
3079
|
allExtensions.splice(idx, 1);
|
|
3075
3080
|
}
|
|
3076
|
-
idx = _coreExtensions
|
|
3081
|
+
idx = arrIndexOf(_coreExtensions, _channelControl);
|
|
3077
3082
|
if (idx !== -1) {
|
|
3078
3083
|
_coreExtensions.splice(idx, 1);
|
|
3079
3084
|
}
|
|
@@ -3138,7 +3143,7 @@
|
|
|
3138
3143
|
function _getPluginChain() {
|
|
3139
3144
|
if (!_pluginChain) {
|
|
3140
3145
|
var extensions = (_coreExtensions || []).slice();
|
|
3141
|
-
if (extensions
|
|
3146
|
+
if (arrIndexOf(extensions, _telemetryInitializerPlugin) === -1) {
|
|
3142
3147
|
extensions.push(_telemetryInitializerPlugin);
|
|
3143
3148
|
}
|
|
3144
3149
|
_pluginChain = createTelemetryProxyChain(sortPlugins(extensions), _self.config, _self);
|
|
@@ -3940,13 +3945,15 @@
|
|
|
3940
3945
|
}
|
|
3941
3946
|
_doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 0 );
|
|
3942
3947
|
var theFunc = aiHook.f;
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3948
|
+
if (theFunc) {
|
|
3949
|
+
try {
|
|
3950
|
+
funcArgs.rslt = theFunc.apply(funcThis, orgArgs);
|
|
3951
|
+
}
|
|
3952
|
+
catch (err) {
|
|
3953
|
+
funcArgs.err = err;
|
|
3954
|
+
_doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 3 );
|
|
3955
|
+
throw err;
|
|
3956
|
+
}
|
|
3950
3957
|
}
|
|
3951
3958
|
_doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 1 );
|
|
3952
3959
|
return funcArgs.rslt;
|
|
@@ -3976,6 +3983,36 @@
|
|
|
3976
3983
|
}
|
|
3977
3984
|
return null;
|
|
3978
3985
|
}
|
|
3986
|
+
function _createInstrumentHook(owner, funcName, fn, callbacks) {
|
|
3987
|
+
var aiHook = fn && fn[aiInstrumentHooks];
|
|
3988
|
+
if (!aiHook) {
|
|
3989
|
+
aiHook = {
|
|
3990
|
+
i: 0,
|
|
3991
|
+
n: funcName,
|
|
3992
|
+
f: fn,
|
|
3993
|
+
h: []
|
|
3994
|
+
};
|
|
3995
|
+
var newFunc = _createFunctionHook(aiHook);
|
|
3996
|
+
newFunc[aiInstrumentHooks] = aiHook;
|
|
3997
|
+
owner[funcName] = newFunc;
|
|
3998
|
+
}
|
|
3999
|
+
var theHook = {
|
|
4000
|
+
id: aiHook.i,
|
|
4001
|
+
cbks: callbacks,
|
|
4002
|
+
rm: function () {
|
|
4003
|
+
var id = this.id;
|
|
4004
|
+
_arrLoop(aiHook.h, function (hook, idx) {
|
|
4005
|
+
if (hook.id === id) {
|
|
4006
|
+
aiHook.h.splice(idx, 1);
|
|
4007
|
+
return 1;
|
|
4008
|
+
}
|
|
4009
|
+
});
|
|
4010
|
+
}
|
|
4011
|
+
};
|
|
4012
|
+
aiHook.i++;
|
|
4013
|
+
aiHook.h.push(theHook);
|
|
4014
|
+
return theHook;
|
|
4015
|
+
}
|
|
3979
4016
|
function InstrumentFunc(target, funcName, callbacks, checkPrototype) {
|
|
3980
4017
|
if (checkPrototype === void 0) { checkPrototype = true; }
|
|
3981
4018
|
if (target && funcName && callbacks) {
|
|
@@ -3983,34 +4020,7 @@
|
|
|
3983
4020
|
if (owner) {
|
|
3984
4021
|
var fn = owner[funcName];
|
|
3985
4022
|
if (typeof fn === strShimFunction) {
|
|
3986
|
-
|
|
3987
|
-
if (!aiHook_1) {
|
|
3988
|
-
aiHook_1 = {
|
|
3989
|
-
i: 0,
|
|
3990
|
-
n: funcName,
|
|
3991
|
-
f: fn,
|
|
3992
|
-
h: []
|
|
3993
|
-
};
|
|
3994
|
-
var newFunc = _createFunctionHook(aiHook_1);
|
|
3995
|
-
newFunc[aiInstrumentHooks] = aiHook_1;
|
|
3996
|
-
owner[funcName] = newFunc;
|
|
3997
|
-
}
|
|
3998
|
-
var theHook = {
|
|
3999
|
-
id: aiHook_1.i,
|
|
4000
|
-
cbks: callbacks,
|
|
4001
|
-
rm: function () {
|
|
4002
|
-
var id = this.id;
|
|
4003
|
-
_arrLoop(aiHook_1.h, function (hook, idx) {
|
|
4004
|
-
if (hook.id === id) {
|
|
4005
|
-
aiHook_1.h.splice(idx, 1);
|
|
4006
|
-
return 1;
|
|
4007
|
-
}
|
|
4008
|
-
});
|
|
4009
|
-
}
|
|
4010
|
-
};
|
|
4011
|
-
aiHook_1.i++;
|
|
4012
|
-
aiHook_1.h.push(theHook);
|
|
4013
|
-
return theHook;
|
|
4023
|
+
return _createInstrumentHook(owner, funcName, fn, callbacks);
|
|
4014
4024
|
}
|
|
4015
4025
|
}
|
|
4016
4026
|
}
|
|
@@ -4030,6 +4040,15 @@
|
|
|
4030
4040
|
});
|
|
4031
4041
|
return hooks;
|
|
4032
4042
|
}
|
|
4043
|
+
function InstrumentEvent(target, evtName, callbacks, checkPrototype) {
|
|
4044
|
+
if (target && evtName && callbacks) {
|
|
4045
|
+
var owner = _getOwner(target, evtName, checkPrototype) || target;
|
|
4046
|
+
if (owner) {
|
|
4047
|
+
return _createInstrumentHook(owner, evtName, owner[evtName], callbacks);
|
|
4048
|
+
}
|
|
4049
|
+
}
|
|
4050
|
+
return null;
|
|
4051
|
+
}
|
|
4033
4052
|
|
|
4034
4053
|
exports.AppInsightsCore = AppInsightsCore;
|
|
4035
4054
|
exports.BaseCore = BaseCore;
|
|
@@ -4038,6 +4057,7 @@
|
|
|
4038
4057
|
exports.DiagnosticLogger = DiagnosticLogger;
|
|
4039
4058
|
exports.EventHelper = EventHelper;
|
|
4040
4059
|
exports.EventsDiscardedReason = EventsDiscardedReason;
|
|
4060
|
+
exports.InstrumentEvent = InstrumentEvent;
|
|
4041
4061
|
exports.InstrumentFunc = InstrumentFunc;
|
|
4042
4062
|
exports.InstrumentFuncs = InstrumentFuncs;
|
|
4043
4063
|
exports.InstrumentProto = InstrumentProto;
|