@nsshunt/stsobservability 1.0.38 → 1.0.40
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/dist/stsobservability.mjs +15 -23
- package/dist/stsobservability.mjs.map +1 -1
- package/dist/stsobservability.umd.js +15 -23
- package/dist/stsobservability.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/publish/agentinstrumentcontroller.d.ts +3 -16
- package/types/publish/agentinstrumentcontroller.d.ts.map +1 -1
- package/types/publish/publishInstrumentController.d.ts +7 -1
- package/types/publish/publishInstrumentController.d.ts.map +1 -1
- package/types/publish/publishers/publishTransportRESTServer.d.ts.map +1 -1
|
@@ -3904,7 +3904,7 @@ var ePublishState = /* @__PURE__ */ ((ePublishState2) => {
|
|
|
3904
3904
|
ePublishState2[ePublishState2["stopping"] = 2] = "stopping";
|
|
3905
3905
|
return ePublishState2;
|
|
3906
3906
|
})(ePublishState || {});
|
|
3907
|
-
class
|
|
3907
|
+
const _PublishInstrumentController = class _PublishInstrumentController extends STSOptionsBase {
|
|
3908
3908
|
constructor(options) {
|
|
3909
3909
|
super(options);
|
|
3910
3910
|
__privateAdd(this, _PublishInstrumentController_instances);
|
|
@@ -4000,6 +4000,16 @@ class PublishInstrumentController extends STSOptionsBase {
|
|
|
4000
4000
|
this.options.logger.debug(chalk$1.red(`UpdateInstrument:${this.options.processContext.nid}: Attempted to UpdateInstrument before initialised.`));
|
|
4001
4001
|
}
|
|
4002
4002
|
}
|
|
4003
|
+
/**
|
|
4004
|
+
* Add additional instrument publishers. Usually invoked when adding workers to the app and/or async runners within a worker.
|
|
4005
|
+
* @param processContext
|
|
4006
|
+
* @returns Returns the newly created PublishInstrumentController
|
|
4007
|
+
*/
|
|
4008
|
+
AddPublishInstrumentController(processContext) {
|
|
4009
|
+
const options = { ...this.options };
|
|
4010
|
+
options.processContext = processContext;
|
|
4011
|
+
return new _PublishInstrumentController(options);
|
|
4012
|
+
}
|
|
4003
4013
|
/*
|
|
4004
4014
|
#GetHttpAgentInstruments(): InstrumentDefinitions {
|
|
4005
4015
|
if (isNode) {
|
|
@@ -4115,7 +4125,7 @@ class PublishInstrumentController extends STSOptionsBase {
|
|
|
4115
4125
|
this.options.logger.debug(chalk.green(`#SetupInstruments:${this.options.processContext.nid}: Completed`));
|
|
4116
4126
|
}
|
|
4117
4127
|
*/
|
|
4118
|
-
}
|
|
4128
|
+
};
|
|
4119
4129
|
_instruments = new WeakMap();
|
|
4120
4130
|
_inPublish = new WeakMap();
|
|
4121
4131
|
_observer2 = new WeakMap();
|
|
@@ -4197,26 +4207,8 @@ UpdateState_fn = function(newState, comment) {
|
|
|
4197
4207
|
__privateSet(this, _publishState, newState);
|
|
4198
4208
|
this.options.logger.debug(chalk$1.yellow(`#UpdateState:${this.options.processContext.nid}: Previous State: [${previousState}]. Current State: [${__privateGet(this, _publishState)}]. Comment: [${comment}]`));
|
|
4199
4209
|
};
|
|
4210
|
+
let PublishInstrumentController = _PublishInstrumentController;
|
|
4200
4211
|
const STSInstrumentControllerPluginKey = Symbol("instrumentController");
|
|
4201
|
-
class AgentInstrumentController extends PublishInstrumentController {
|
|
4202
|
-
/**
|
|
4203
|
-
* Create the primary instrument publisher
|
|
4204
|
-
* @param options
|
|
4205
|
-
*/
|
|
4206
|
-
constructor(options) {
|
|
4207
|
-
super(options);
|
|
4208
|
-
}
|
|
4209
|
-
/**
|
|
4210
|
-
* Add additional instrument publishers. Usually invoked when adding workers to the app and/or async runners within a worker.
|
|
4211
|
-
* @param processContext
|
|
4212
|
-
* @returns Returns the newly created PublishInstrumentController
|
|
4213
|
-
*/
|
|
4214
|
-
AddPublishInstrumentController(processContext) {
|
|
4215
|
-
const options = { ...this.options };
|
|
4216
|
-
options.processContext = processContext;
|
|
4217
|
-
return new PublishInstrumentController(options);
|
|
4218
|
-
}
|
|
4219
|
-
}
|
|
4220
4212
|
const GetSTSInstrumentControllerPluginKey = () => STSInstrumentControllerPluginKey;
|
|
4221
4213
|
const CompareSTSInstrumentControllerPluginKey = (val) => val === STSInstrumentControllerPluginKey;
|
|
4222
4214
|
const useSTSInstrumentControllerPlugin = () => inject(STSInstrumentControllerPluginKey);
|
|
@@ -4227,7 +4219,7 @@ const STSInstrumentControllerPlugin = {
|
|
|
4227
4219
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4228
4220
|
install: (app, options) => {
|
|
4229
4221
|
options.logger.debug(chalk$1.yellow(`STSInstrumentControllerPlugin:install:Start`));
|
|
4230
|
-
const aic = new
|
|
4222
|
+
const aic = new PublishInstrumentController(options);
|
|
4231
4223
|
if (!app.config.globalProperties.$sts) {
|
|
4232
4224
|
options.logger.debug(chalk$1.cyan(`STSInstrumentControllerPlugin:install: [app.config.globalProperties.$sts] does not exist.`));
|
|
4233
4225
|
app.config.globalProperties.$sts = {};
|
|
@@ -4890,6 +4882,7 @@ class PublishTransportRESTServer extends STSOptionsBase {
|
|
|
4890
4882
|
try {
|
|
4891
4883
|
if (this.options.showPublishPayload) {
|
|
4892
4884
|
console.log(chalk$1.grey(`PublishTransportRESTServer::Publish() url: [${this.options.url}]`));
|
|
4885
|
+
console.log(payload);
|
|
4893
4886
|
}
|
|
4894
4887
|
const encodedData = encode(payload, { ignoreUndefined: true });
|
|
4895
4888
|
const headers = { "Content-Type": "application/octet-stream" };
|
|
@@ -6710,7 +6703,6 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
|
|
|
6710
6703
|
});
|
|
6711
6704
|
};
|
|
6712
6705
|
export {
|
|
6713
|
-
AgentInstrumentController,
|
|
6714
6706
|
CompareSTSInstrumentControllerPluginKey,
|
|
6715
6707
|
CreateInstrument,
|
|
6716
6708
|
Gauge,
|