@microsoft/applicationinsights-core-js 2.8.1-nightly.2204-20 → 2.8.2-nightly.2204-22
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 +53 -37
- 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 +4 -1
- package/dist/applicationinsights-core-js.d.ts +12 -2
- package/dist/applicationinsights-core-js.js +53 -37
- 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 +12 -2
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +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 +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 +67 -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 +1 -1
- package/src/JavaScriptSDK/DataCacheHelper.ts +1 -1
- package/src/JavaScriptSDK/InstrumentHooks.ts +74 -47
- package/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts +1 -1
- package/types/JavaScriptSDK/InstrumentHooks.d.ts +9 -0
- package/types/JavaScriptSDK.Enums/EnumHelperFuncs.d.ts +1 -1
- package/types/applicationinsights-core-js.d.ts +1 -1
|
@@ -6582,7 +6582,7 @@
|
|
|
6582
6582
|
},
|
|
6583
6583
|
{
|
|
6584
6584
|
"kind": "Content",
|
|
6585
|
-
"text": "{\n [key in keyof E]: [
|
|
6585
|
+
"text": "{\n [key in keyof E]: [E[keyof E], V[keyof V]];\n}"
|
|
6586
6586
|
},
|
|
6587
6587
|
{
|
|
6588
6588
|
"kind": "Content",
|
|
@@ -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)",
|
|
@@ -168,7 +168,7 @@ export function createUnloadHandlerContainer(): {
|
|
|
168
168
|
|
|
169
169
|
// @public
|
|
170
170
|
export function createValueMap<E, V = E>(values: {
|
|
171
|
-
[key in keyof E]: [
|
|
171
|
+
[key in keyof E]: [E[keyof E], V[keyof V]];
|
|
172
172
|
}): V;
|
|
173
173
|
|
|
174
174
|
// @public
|
|
@@ -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-22
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -400,7 +400,7 @@ declare namespace ApplicationInsights {
|
|
|
400
400
|
* @returns
|
|
401
401
|
*/
|
|
402
402
|
function createValueMap<E, V = E>(values: {
|
|
403
|
-
[key in keyof E]: [
|
|
403
|
+
[key in keyof E]: [E[keyof E], V[keyof V]];
|
|
404
404
|
}): V;
|
|
405
405
|
|
|
406
406
|
/**
|
|
@@ -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-22
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -1577,7 +1577,7 @@
|
|
|
1577
1577
|
}
|
|
1578
1578
|
|
|
1579
1579
|
var _objDefineProperty = ObjDefineProperty;
|
|
1580
|
-
var version = "2.8.
|
|
1580
|
+
var version = "2.8.2-nightly.2204-22";
|
|
1581
1581
|
var instanceName = "." + newId(6);
|
|
1582
1582
|
var _dataUid = 0;
|
|
1583
1583
|
function _createAccessor(target, prop, value) {
|
|
@@ -3940,13 +3940,15 @@
|
|
|
3940
3940
|
}
|
|
3941
3941
|
_doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 0 );
|
|
3942
3942
|
var theFunc = aiHook.f;
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3943
|
+
if (theFunc) {
|
|
3944
|
+
try {
|
|
3945
|
+
funcArgs.rslt = theFunc.apply(funcThis, orgArgs);
|
|
3946
|
+
}
|
|
3947
|
+
catch (err) {
|
|
3948
|
+
funcArgs.err = err;
|
|
3949
|
+
_doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 3 );
|
|
3950
|
+
throw err;
|
|
3951
|
+
}
|
|
3950
3952
|
}
|
|
3951
3953
|
_doCallbacks(hooks, funcArgs, cbArgs, hookCtx, 1 );
|
|
3952
3954
|
return funcArgs.rslt;
|
|
@@ -3976,6 +3978,36 @@
|
|
|
3976
3978
|
}
|
|
3977
3979
|
return null;
|
|
3978
3980
|
}
|
|
3981
|
+
function _createInstrumentHook(owner, funcName, fn, callbacks) {
|
|
3982
|
+
var aiHook = fn && fn[aiInstrumentHooks];
|
|
3983
|
+
if (!aiHook) {
|
|
3984
|
+
aiHook = {
|
|
3985
|
+
i: 0,
|
|
3986
|
+
n: funcName,
|
|
3987
|
+
f: fn,
|
|
3988
|
+
h: []
|
|
3989
|
+
};
|
|
3990
|
+
var newFunc = _createFunctionHook(aiHook);
|
|
3991
|
+
newFunc[aiInstrumentHooks] = aiHook;
|
|
3992
|
+
owner[funcName] = newFunc;
|
|
3993
|
+
}
|
|
3994
|
+
var theHook = {
|
|
3995
|
+
id: aiHook.i,
|
|
3996
|
+
cbks: callbacks,
|
|
3997
|
+
rm: function () {
|
|
3998
|
+
var id = this.id;
|
|
3999
|
+
_arrLoop(aiHook.h, function (hook, idx) {
|
|
4000
|
+
if (hook.id === id) {
|
|
4001
|
+
aiHook.h.splice(idx, 1);
|
|
4002
|
+
return 1;
|
|
4003
|
+
}
|
|
4004
|
+
});
|
|
4005
|
+
}
|
|
4006
|
+
};
|
|
4007
|
+
aiHook.i++;
|
|
4008
|
+
aiHook.h.push(theHook);
|
|
4009
|
+
return theHook;
|
|
4010
|
+
}
|
|
3979
4011
|
function InstrumentFunc(target, funcName, callbacks, checkPrototype) {
|
|
3980
4012
|
if (checkPrototype === void 0) { checkPrototype = true; }
|
|
3981
4013
|
if (target && funcName && callbacks) {
|
|
@@ -3983,34 +4015,7 @@
|
|
|
3983
4015
|
if (owner) {
|
|
3984
4016
|
var fn = owner[funcName];
|
|
3985
4017
|
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;
|
|
4018
|
+
return _createInstrumentHook(owner, funcName, fn, callbacks);
|
|
4014
4019
|
}
|
|
4015
4020
|
}
|
|
4016
4021
|
}
|
|
@@ -4030,6 +4035,16 @@
|
|
|
4030
4035
|
});
|
|
4031
4036
|
return hooks;
|
|
4032
4037
|
}
|
|
4038
|
+
function InstrumentEvent(target, evtName, callbacks, checkPrototype) {
|
|
4039
|
+
if (checkPrototype === void 0) { checkPrototype = true; }
|
|
4040
|
+
if (target && evtName && callbacks) {
|
|
4041
|
+
var owner = _getOwner(target, evtName, checkPrototype);
|
|
4042
|
+
if (owner) {
|
|
4043
|
+
return _createInstrumentHook(owner, evtName, owner[evtName], callbacks);
|
|
4044
|
+
}
|
|
4045
|
+
}
|
|
4046
|
+
return null;
|
|
4047
|
+
}
|
|
4033
4048
|
|
|
4034
4049
|
exports.AppInsightsCore = AppInsightsCore;
|
|
4035
4050
|
exports.BaseCore = BaseCore;
|
|
@@ -4038,6 +4053,7 @@
|
|
|
4038
4053
|
exports.DiagnosticLogger = DiagnosticLogger;
|
|
4039
4054
|
exports.EventHelper = EventHelper;
|
|
4040
4055
|
exports.EventsDiscardedReason = EventsDiscardedReason;
|
|
4056
|
+
exports.InstrumentEvent = InstrumentEvent;
|
|
4041
4057
|
exports.InstrumentFunc = InstrumentFunc;
|
|
4042
4058
|
exports.InstrumentFuncs = InstrumentFuncs;
|
|
4043
4059
|
exports.InstrumentProto = InstrumentProto;
|