@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.
@@ -21,7 +21,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
21
21
  }
22
22
  });
23
23
 
24
- 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, _httpsAgent2, _SocketIoClientHelper_instances, LogDebugMessage_fn5, LogErrorMessage_fn4, EstablishSocketConnect_fn, _socketIoServerHelperOptions, _namespace, _SetupStandardEvents, _SetupConnectionMiddleware, _SetupMessageMiddleware;
24
+ 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;
25
25
  var Gauge = /* @__PURE__ */ ((Gauge2) => {
26
26
  Gauge2["ACTIVE_REQUEST_GAUGE"] = "a";
27
27
  Gauge2["AUTHENTICATION_COUNT_GAUGE"] = "b";
@@ -8666,18 +8666,11 @@ var __privateWrapper = (obj, member, setter, getter) => ({
8666
8666
  __privateAdd(this, _SocketIoClientHelper_instances);
8667
8667
  __privateAdd(this, _options7);
8668
8668
  __privateAdd(this, _sockets, {});
8669
- __privateAdd(this, _httpsAgent2, null);
8669
+ __privateAdd(this, _agentManager3, null);
8670
8670
  __privateSet(this, _options7, options);
8671
8671
  if (isNode) {
8672
- const agentOptions = __privateGet(this, _options7).agentOptions;
8673
- __privateSet(this, _httpsAgent2, new https.Agent({
8674
- keepAlive: agentOptions == null ? void 0 : agentOptions.keepAlive,
8675
- maxSockets: agentOptions == null ? void 0 : agentOptions.maxSockets,
8676
- maxTotalSockets: agentOptions == null ? void 0 : agentOptions.maxTotalSockets,
8677
- maxFreeSockets: agentOptions == null ? void 0 : agentOptions.maxFreeSockets,
8678
- timeout: agentOptions == null ? void 0 : agentOptions.timeout,
8679
- rejectUnauthorized: agentOptions == null ? void 0 : agentOptions.rejectUnauthorized
8680
- // Allows self signed certs in non production mode(s)
8672
+ __privateSet(this, _agentManager3, new AgentManager({
8673
+ agentOptions: __privateGet(this, _options7).agentOptions
8681
8674
  }));
8682
8675
  }
8683
8676
  }
@@ -8703,7 +8696,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
8703
8696
  }
8704
8697
  _options7 = new WeakMap();
8705
8698
  _sockets = new WeakMap();
8706
- _httpsAgent2 = new WeakMap();
8699
+ _agentManager3 = new WeakMap();
8707
8700
  _SocketIoClientHelper_instances = new WeakSet();
8708
8701
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8709
8702
  LogDebugMessage_fn5 = function(message) {
@@ -8714,6 +8707,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
8714
8707
  if (__privateGet(this, _options7).logger) __privateGet(this, _options7).logger.error(message);
8715
8708
  };
8716
8709
  EstablishSocketConnect_fn = function(name2, onConnectCallBack, socketEventsCallBack) {
8710
+ var _a2;
8717
8711
  const socketDetail = this.sockets[name2];
8718
8712
  if (socketDetail.socket !== null) {
8719
8713
  if (socketDetail.socket.connected === true) {
@@ -8732,8 +8726,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
8732
8726
  socketOptions = {
8733
8727
  transports: ["websocket"],
8734
8728
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8735
- agent: __privateGet(this, _httpsAgent2)
8736
- // Custom https agent
8729
+ agent: (_a2 = __privateGet(this, _agentManager3)) == null ? void 0 : _a2.GetAgent(socketDetail.address)
8737
8730
  };
8738
8731
  } else {
8739
8732
  socketOptions = {