@nsshunt/stsobservability 1.0.74 → 1.0.75
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.
|
@@ -17,7 +17,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
17
17
|
return __privateGet(obj, member, getter);
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
var _a, _label, _options2, _data2, _val, _interval, _timeoutComputeVelocity, _lastVelocity, _delta, _maxVelocity, _timerInterval, _copy, _velocity, _velocityVal, _valStack, _averageValStack, _maxAverageValStack, _maxAverageIterations, _valStackMaxLength, _valStackAverage, _timeStamp, _maxTimeDiff, _vaTimeDiff, _velocityTimeDiff, _autoComputeVelocity, _autoComputeVelocityTimeout, _countDiff, _timeDiff, _deltaCountDiff, _deltaTimeDif, _minTimeForReporting, _averageVelocity, _InstrumentVelocity_instances, ComputeVelocityByTimeDiff_fn, ComputeVelocity_fn, SetupAutoComputeVelocity_fn, GetVelocityStackAverage_fn, GetVal_fn, SetVal_fn, GetVelocity_fn, GetMaxVelocity_fn, GetDelta_fn, GetTimeStamp_fn, GetCountDiff_fn, GetTimeDiff_fn, GetDeltaCountDiff_fn, GetDeltaTimeDif_fn, GetAverageVelocity_fn, _histogramData, _val2, _copy2, _InstrumentHistogram_instances, GetVal_fn2, SetVal_fn2, GetHistogramData_fn, SetHistogramData_fn, _messages, _readPos, _maxSize, _copy3, _useLatestMessages, _consoleLogging, _instrumentLogging, _winstonLogging, _stsLogger, _InstrumentLog_instances, DumpToConsole_fn, GetVal_fn3, SetVal_fn3, _start, _copy4, _pauseVal, _InstrumentTimerGauge_instances, GetVal_fn4, SetVal_fn4, _val3, _maxval, _lastObservedValue, _timeSeriesList, _maxSampleSize, _timerInterval2, _observer, _min, _max, _observations, _total, _copy5, _InstrumentGauge_instances, GetVal_fn5, SetVal_fn5, GetMin_fn, GetMax_fn, GetAverage_fn, GetAndResetMaxVal_fn, NumberCompare_fn, GetPercentileData_fn, _val4, _copy6, _InstrumentObject_instances, GetVal_fn6, SetVal_fn6, _tinyEmitter, _RequestCompleted, _agentManager2, _inPublish, _observer2, _publishState, _publisherTransport, _PublishInstruments_instances, PublishTimeoutLoop_fn, UpdateState_fn, _instruments, _publisher, _PublishInstrumentController_instances, GetInstrument_fn, ProcessTelemetryCommand_fn, CreateInstrument_fn, CreateInstruments_fn, _kafkaLog, _maxLogLength, _socketSubscribeKeepAlive, _options3, _ObservabilityRESTAPISubscriber_instances, LogDebugMessage_fn, LogErrorMessage_fn, InvokeRESTAPI_fn, _GetData, SetupTimeout_fn, AddKeepAlive_fn, RemoveKeepAlive_fn, _messageWithAckPayloadRecords, _socket, _maxReties, _timeoutValue, _options4, _SocketIoMessageSender_instances, LogDebugMessage_fn2, GetSubscribeKeepAliveAckEventName_fn, _socketSubscribeKeepAlive2, _socket2, _options5, _socketIoMessageSender, _ObservabilitySocketIOSubscriber_instances, LogDebugMessage_fn3, LogErrorMessage_fn2, AddKeepAlive_fn2, RemoveKeepAlive_fn2, _observabilitySocketIOSubscriber, _subscriptions, _kafkaHelper, _serviceModel, _agentModel, _lambdaModel, _options6, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4, LogErrorMessage_fn3, _options7, _sockets,
|
|
20
|
+
var _a, _label, _options2, _data2, _val, _interval, _timeoutComputeVelocity, _lastVelocity, _delta, _maxVelocity, _timerInterval, _copy, _velocity, _velocityVal, _valStack, _averageValStack, _maxAverageValStack, _maxAverageIterations, _valStackMaxLength, _valStackAverage, _timeStamp, _maxTimeDiff, _vaTimeDiff, _velocityTimeDiff, _autoComputeVelocity, _autoComputeVelocityTimeout, _countDiff, _timeDiff, _deltaCountDiff, _deltaTimeDif, _minTimeForReporting, _averageVelocity, _InstrumentVelocity_instances, ComputeVelocityByTimeDiff_fn, ComputeVelocity_fn, SetupAutoComputeVelocity_fn, GetVelocityStackAverage_fn, GetVal_fn, SetVal_fn, GetVelocity_fn, GetMaxVelocity_fn, GetDelta_fn, GetTimeStamp_fn, GetCountDiff_fn, GetTimeDiff_fn, GetDeltaCountDiff_fn, GetDeltaTimeDif_fn, GetAverageVelocity_fn, _histogramData, _val2, _copy2, _InstrumentHistogram_instances, GetVal_fn2, SetVal_fn2, GetHistogramData_fn, SetHistogramData_fn, _messages, _readPos, _maxSize, _copy3, _useLatestMessages, _consoleLogging, _instrumentLogging, _winstonLogging, _stsLogger, _InstrumentLog_instances, DumpToConsole_fn, GetVal_fn3, SetVal_fn3, _start, _copy4, _pauseVal, _InstrumentTimerGauge_instances, GetVal_fn4, SetVal_fn4, _val3, _maxval, _lastObservedValue, _timeSeriesList, _maxSampleSize, _timerInterval2, _observer, _min, _max, _observations, _total, _copy5, _InstrumentGauge_instances, GetVal_fn5, SetVal_fn5, GetMin_fn, GetMax_fn, GetAverage_fn, GetAndResetMaxVal_fn, NumberCompare_fn, GetPercentileData_fn, _val4, _copy6, _InstrumentObject_instances, GetVal_fn6, SetVal_fn6, _tinyEmitter, _RequestCompleted, _agentManager2, _inPublish, _observer2, _publishState, _publisherTransport, _PublishInstruments_instances, PublishTimeoutLoop_fn, UpdateState_fn, _instruments, _publisher, _PublishInstrumentController_instances, GetInstrument_fn, ProcessTelemetryCommand_fn, CreateInstrument_fn, CreateInstruments_fn, _kafkaLog, _maxLogLength, _socketSubscribeKeepAlive, _options3, _ObservabilityRESTAPISubscriber_instances, LogDebugMessage_fn, LogErrorMessage_fn, InvokeRESTAPI_fn, _GetData, SetupTimeout_fn, AddKeepAlive_fn, RemoveKeepAlive_fn, _messageWithAckPayloadRecords, _socket, _maxReties, _timeoutValue, _options4, _SocketIoMessageSender_instances, LogDebugMessage_fn2, GetSubscribeKeepAliveAckEventName_fn, _socketSubscribeKeepAlive2, _socket2, _options5, _socketIoMessageSender, _ObservabilitySocketIOSubscriber_instances, LogDebugMessage_fn3, LogErrorMessage_fn2, AddKeepAlive_fn2, RemoveKeepAlive_fn2, _observabilitySocketIOSubscriber, _subscriptions, _kafkaHelper, _serviceModel, _agentModel, _lambdaModel, _options6, _ObservabilitySubscriptionManager_instances, LogDebugMessage_fn4, LogErrorMessage_fn3, _options7, _sockets, _agentManager3, _SocketIoClientHelper_instances, LogDebugMessage_fn5, LogErrorMessage_fn4, EstablishSocketConnect_fn, _socketIoServerHelperOptions, _namespace, _SetupStandardEvents, _SetupConnectionMiddleware, _SetupMessageMiddleware;
|
|
21
21
|
import _cloneDeep from "lodash.clonedeep";
|
|
22
22
|
import isNode from "detect-node";
|
|
23
23
|
import { STSOptionsBase } from "@nsshunt/stsutils";
|
|
@@ -8670,18 +8670,11 @@ class SocketIoClientHelper {
|
|
|
8670
8670
|
__privateAdd(this, _SocketIoClientHelper_instances);
|
|
8671
8671
|
__privateAdd(this, _options7);
|
|
8672
8672
|
__privateAdd(this, _sockets, {});
|
|
8673
|
-
__privateAdd(this,
|
|
8673
|
+
__privateAdd(this, _agentManager3, null);
|
|
8674
8674
|
__privateSet(this, _options7, options);
|
|
8675
8675
|
if (isNode) {
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
keepAlive: agentOptions == null ? void 0 : agentOptions.keepAlive,
|
|
8679
|
-
maxSockets: agentOptions == null ? void 0 : agentOptions.maxSockets,
|
|
8680
|
-
maxTotalSockets: agentOptions == null ? void 0 : agentOptions.maxTotalSockets,
|
|
8681
|
-
maxFreeSockets: agentOptions == null ? void 0 : agentOptions.maxFreeSockets,
|
|
8682
|
-
timeout: agentOptions == null ? void 0 : agentOptions.timeout,
|
|
8683
|
-
rejectUnauthorized: agentOptions == null ? void 0 : agentOptions.rejectUnauthorized
|
|
8684
|
-
// Allows self signed certs in non production mode(s)
|
|
8676
|
+
__privateSet(this, _agentManager3, new AgentManager({
|
|
8677
|
+
agentOptions: __privateGet(this, _options7).agentOptions
|
|
8685
8678
|
}));
|
|
8686
8679
|
}
|
|
8687
8680
|
}
|
|
@@ -8707,7 +8700,7 @@ class SocketIoClientHelper {
|
|
|
8707
8700
|
}
|
|
8708
8701
|
_options7 = new WeakMap();
|
|
8709
8702
|
_sockets = new WeakMap();
|
|
8710
|
-
|
|
8703
|
+
_agentManager3 = new WeakMap();
|
|
8711
8704
|
_SocketIoClientHelper_instances = new WeakSet();
|
|
8712
8705
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8713
8706
|
LogDebugMessage_fn5 = function(message) {
|
|
@@ -8718,6 +8711,7 @@ LogErrorMessage_fn4 = function(message) {
|
|
|
8718
8711
|
if (__privateGet(this, _options7).logger) __privateGet(this, _options7).logger.error(message);
|
|
8719
8712
|
};
|
|
8720
8713
|
EstablishSocketConnect_fn = function(name2, onConnectCallBack, socketEventsCallBack) {
|
|
8714
|
+
var _a2;
|
|
8721
8715
|
const socketDetail = this.sockets[name2];
|
|
8722
8716
|
if (socketDetail.socket !== null) {
|
|
8723
8717
|
if (socketDetail.socket.connected === true) {
|
|
@@ -8736,8 +8730,7 @@ EstablishSocketConnect_fn = function(name2, onConnectCallBack, socketEventsCallB
|
|
|
8736
8730
|
socketOptions = {
|
|
8737
8731
|
transports: ["websocket"],
|
|
8738
8732
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8739
|
-
agent: __privateGet(this,
|
|
8740
|
-
// Custom https agent
|
|
8733
|
+
agent: (_a2 = __privateGet(this, _agentManager3)) == null ? void 0 : _a2.GetAgent(socketDetail.address)
|
|
8741
8734
|
};
|
|
8742
8735
|
} else {
|
|
8743
8736
|
socketOptions = {
|