@nsshunt/stsoauth2plugin 1.0.71 → 1.0.72

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.
@@ -42,7 +42,6 @@ import { ClientStorageFactory, ClientStorageType } from "@nsshunt/stsvueutils";
42
42
  import { defineStore } from "pinia";
43
43
  import https from "node:https";
44
44
  import axios from "axios";
45
- import debugModule from "debug";
46
45
  import "socket.io-client";
47
46
  import "colors";
48
47
  const STSOAuth2ManagerPluginKey = Symbol();
@@ -5715,70 +5714,24 @@ __publicField2(_ObservabilityModelUtils, "ParseModelNodeObject", (model, data, p
5715
5714
  model.instruments[gaugeName] = _ObservabilityModelUtils.GetModelNodeObject({});
5716
5715
  }
5717
5716
  });
5718
- debugModule(`proc:${process.pid}`);
5719
5717
  const byteToHex = [];
5720
5718
  for (let i = 0; i < 256; ++i) {
5721
5719
  byteToHex.push((i + 256).toString(16).slice(1));
5722
5720
  }
5723
5721
  typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
5722
+ const instrumentationObservationInterval = 1e3;
5723
+ const instrumentationTimeWindow = 600;
5724
+ const consoleLogging = true;
5725
+ const instrumentLogging = true;
5724
5726
  ({
5725
5727
  coreFieldList: [
5726
- {
5727
- fieldName: "requestCount",
5728
- gauge: Gauge.REQUEST_COUNT_GAUGE,
5729
- instrumentProperty: "val",
5730
- dataType: "number",
5731
- influxdbDataType: "intField"
5732
- /* intField */
5733
- },
5734
- {
5735
- fieldName: "errorCount",
5736
- gauge: Gauge.ERROR_COUNT_GAUGE,
5737
- instrumentProperty: "val",
5738
- dataType: "number",
5739
- influxdbDataType: "intField"
5740
- /* intField */
5741
- },
5742
- {
5743
- fieldName: "retryCount",
5744
- gauge: Gauge.RETRY_COUNT_GAUGE,
5745
- instrumentProperty: "val",
5746
- dataType: "number",
5747
- influxdbDataType: "intField"
5748
- /* intField */
5749
- },
5750
- {
5751
- fieldName: "authenticationCount",
5752
- gauge: Gauge.AUTHENTICATION_COUNT_GAUGE,
5753
- instrumentProperty: "val",
5754
- dataType: "number",
5755
- influxdbDataType: "intField"
5756
- /* intField */
5757
- },
5758
- {
5759
- fieldName: "authenticationErrorCount",
5760
- gauge: Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE,
5761
- instrumentProperty: "val",
5762
- dataType: "number",
5763
- influxdbDataType: "intField"
5764
- /* intField */
5765
- },
5766
- {
5767
- fieldName: "authenticationRetryCount",
5768
- gauge: Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE,
5769
- instrumentProperty: "val",
5770
- dataType: "number",
5771
- influxdbDataType: "intField"
5772
- /* intField */
5773
- },
5774
- {
5775
- fieldName: "velocity",
5776
- gauge: Gauge.VELOCITY_GAUGE,
5777
- instrumentProperty: "va",
5778
- dataType: "number",
5779
- influxdbDataType: "floatField"
5780
- /* floatField */
5781
- },
5728
+ { fieldName: "requestCount", gauge: Gauge.REQUEST_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5729
+ { fieldName: "errorCount", gauge: Gauge.ERROR_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5730
+ { fieldName: "retryCount", gauge: Gauge.RETRY_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5731
+ { fieldName: "authenticationCount", gauge: Gauge.AUTHENTICATION_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5732
+ { fieldName: "authenticationErrorCount", gauge: Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5733
+ { fieldName: "authenticationRetryCount", gauge: Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5734
+ { fieldName: "velocity", gauge: Gauge.VELOCITY_GAUGE, instrumentProperty: "va", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },
5782
5735
  {
5783
5736
  fieldName: "activeRequestCount",
5784
5737
  gauge: Gauge.ACTIVE_REQUEST_GAUGE,
@@ -5786,41 +5739,17 @@ typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(cry
5786
5739
  dataType: "number",
5787
5740
  timeSeriesIndex: true,
5788
5741
  quantile: true,
5789
- influxdbDataType: "intField"
5790
- /* intField */
5791
- },
5792
- {
5793
- fieldName: "coreCount",
5794
- gauge: Gauge.CORE_COUNT_GAUGE,
5795
- instrumentProperty: "val",
5796
- dataType: "number",
5797
- influxdbDataType: "intField"
5798
- /* intField */
5799
- },
5800
- {
5801
- fieldName: "rx",
5802
- gauge: Gauge.NETWORK_RX_GAUGE,
5803
- instrumentProperty: "va",
5804
- dataType: "number",
5805
- influxdbDataType: "floatField"
5806
- /* floatField */
5807
- },
5808
- {
5809
- fieldName: "tx",
5810
- gauge: Gauge.NETWORK_TX_GAUGE,
5811
- instrumentProperty: "va",
5812
- dataType: "number",
5813
- influxdbDataType: "floatField"
5814
- /* floatField */
5815
- },
5816
- {
5817
- fieldName: "timer",
5818
- gauge: Gauge.TIMER_GAUGE,
5819
- instrumentProperty: "val",
5820
- dataType: "number",
5821
- influxdbDataType: "floatField"
5822
- /* floatField */
5742
+ influxdbDataType: "intField",
5743
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
5744
+ instrumentOptions: {
5745
+ interval: instrumentationObservationInterval,
5746
+ sampleSize: instrumentationTimeWindow
5747
+ }
5823
5748
  },
5749
+ { fieldName: "coreCount", gauge: Gauge.CORE_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5750
+ { fieldName: "rx", gauge: Gauge.NETWORK_RX_GAUGE, instrumentProperty: "va", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },
5751
+ { fieldName: "tx", gauge: Gauge.NETWORK_TX_GAUGE, instrumentProperty: "va", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },
5752
+ { fieldName: "timer", gauge: Gauge.TIMER_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_TIMER },
5824
5753
  {
5825
5754
  fieldName: "duration",
5826
5755
  gauge: Gauge.DURATION_GAUGE,
@@ -5829,6 +5758,11 @@ typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(cry
5829
5758
  timeSeriesIndex: true,
5830
5759
  quantile: true,
5831
5760
  influxdbDataType: "floatField",
5761
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
5762
+ instrumentOptions: {
5763
+ interval: instrumentationObservationInterval,
5764
+ sampleSize: instrumentationTimeWindow
5765
+ },
5832
5766
  histo: [
5833
5767
  { label: "B10", bucketLimit: 10 },
5834
5768
  { label: "B20", bucketLimit: 20 },
@@ -5837,7 +5771,8 @@ typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(cry
5837
5771
  { label: "B1000", bucketLimit: 1e3 },
5838
5772
  { label: "B50000", bucketLimit: 5e4 },
5839
5773
  { label: "BInfinity", bucketLimit: -1 }
5840
- ]
5774
+ ],
5775
+ histoGaugeType: Gauge.DURATION_HISTOGRAM_GAUGE
5841
5776
  },
5842
5777
  {
5843
5778
  fieldName: "latency",
@@ -5847,6 +5782,11 @@ typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(cry
5847
5782
  timeSeriesIndex: true,
5848
5783
  quantile: true,
5849
5784
  influxdbDataType: "floatField",
5785
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
5786
+ instrumentOptions: {
5787
+ interval: instrumentationObservationInterval,
5788
+ sampleSize: instrumentationTimeWindow
5789
+ },
5850
5790
  histo: [
5851
5791
  { label: "B10", bucketLimit: 10 },
5852
5792
  { label: "B20", bucketLimit: 20 },
@@ -5855,7 +5795,24 @@ typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(cry
5855
5795
  { label: "B1000", bucketLimit: 1e3 },
5856
5796
  { label: "B50000", bucketLimit: 5e4 },
5857
5797
  { label: "BInfinity", bucketLimit: -1 }
5858
- ]
5798
+ ],
5799
+ histoGaugeType: Gauge.LATENCY_HISTOGRAM_GAUGE
5800
+ }
5801
+ ],
5802
+ logFieldList: [
5803
+ {
5804
+ fieldName: "log",
5805
+ gauge: Gauge.LOGGER,
5806
+ instrumentProperty: "val",
5807
+ dataType: "string",
5808
+ timeSeriesIndex: false,
5809
+ quantile: false,
5810
+ influxdbDataType: "stringField",
5811
+ gaugeType: GaugeTypes.INSTRUMENT_LOG,
5812
+ instrumentOptions: {
5813
+ consoleLogging,
5814
+ instrumentLogging
5815
+ }
5859
5816
  }
5860
5817
  ],
5861
5818
  services: {
@@ -5884,8 +5841,12 @@ typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(cry
5884
5841
  dataType: "number",
5885
5842
  timeSeriesIndex: true,
5886
5843
  quantile: true,
5887
- influxdbDataType: "floatField"
5888
- /* floatField */
5844
+ influxdbDataType: "floatField",
5845
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
5846
+ instrumentOptions: {
5847
+ interval: instrumentationObservationInterval,
5848
+ sampleSize: instrumentationTimeWindow
5849
+ }
5889
5850
  },
5890
5851
  {
5891
5852
  fieldName: "connectionCount",
@@ -5894,50 +5855,27 @@ typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(cry
5894
5855
  dataType: "number",
5895
5856
  timeSeriesIndex: true,
5896
5857
  quantile: true,
5897
- influxdbDataType: "intField"
5898
- /* intField */
5899
- },
5900
- {
5901
- fieldName: "connectionPoolCount",
5902
- gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE,
5903
- instrumentProperty: "val",
5904
- dataType: "number",
5905
- influxdbDataType: "intField"
5906
- /* intField */
5907
- },
5908
- {
5909
- fieldName: "connectionIdleCount",
5910
- gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE,
5911
- instrumentProperty: "val",
5912
- dataType: "number",
5913
- influxdbDataType: "intField"
5914
- /* intField */
5915
- },
5916
- {
5917
- fieldName: "connectionWaitingCount",
5918
- gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE,
5919
- instrumentProperty: "val",
5920
- dataType: "number",
5921
- influxdbDataType: "intField"
5922
- /* intField */
5923
- },
5924
- {
5925
- fieldName: "systemcpu",
5926
- gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE,
5927
- instrumentProperty: "val",
5928
- dataType: "number",
5929
- timeSeriesIndex: true,
5930
- quantile: true,
5931
- influxdbDataType: "floatField"
5932
- /* floatField */
5858
+ influxdbDataType: "intField",
5859
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
5860
+ instrumentOptions: {
5861
+ interval: instrumentationObservationInterval,
5862
+ sampleSize: instrumentationTimeWindow
5863
+ }
5933
5864
  },
5865
+ { fieldName: "connectionPoolCount", gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5866
+ { fieldName: "connectionIdleCount", gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5867
+ { fieldName: "connectionWaitingCount", gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5868
+ { fieldName: "systemcpu", gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5934
5869
  {
5935
5870
  fieldName: "memory",
5936
5871
  gauge: Gauge.OBJECT_GAUGE,
5937
5872
  instrumentProperty: "val",
5938
5873
  dataType: "JSON",
5939
- influxdbDataType: "stringField"
5940
- /* stringField */
5874
+ influxdbDataType: "stringField",
5875
+ gaugeType: GaugeTypes.INSTRUMENT_OBJECT,
5876
+ instrumentOptions: {
5877
+ label: "InstrumentObjectMaster"
5878
+ }
5941
5879
  }
5942
5880
  ],
5943
5881
  GetPathFromContext(context) {
@@ -5983,14 +5921,7 @@ typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(cry
5983
5921
  instantPrefix: "/agentInstant:"
5984
5922
  },
5985
5923
  fieldList: [
5986
- {
5987
- fieldName: "childCount",
5988
- gauge: Gauge.CHILD_COUNT,
5989
- instrumentProperty: "val",
5990
- dataType: "number",
5991
- influxdbDataType: "intField"
5992
- /* intField */
5993
- }
5924
+ { fieldName: "childCount", gauge: Gauge.CHILD_COUNT, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE }
5994
5925
  ],
5995
5926
  //@@ need type declare in appframework ?? agent does not use appframework ... perhaps stspublisher
5996
5927
  GetPathFromContext(context) {
@@ -6042,68 +5973,13 @@ typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(cry
6042
5973
  instantPrefix: "/lambdaInstant:"
6043
5974
  },
6044
5975
  fieldList: [
6045
- {
6046
- fieldName: "cpu",
6047
- gauge: Gauge.CPU_LOAD_GAUGE,
6048
- instrumentProperty: "val",
6049
- dataType: "number",
6050
- timeSeriesIndex: true,
6051
- quantile: true,
6052
- influxdbDataType: "floatField"
6053
- /* floatField */
6054
- },
6055
- {
6056
- fieldName: "connectionCount",
6057
- gauge: Gauge.CONNECTION_COUNT_GAUGE,
6058
- instrumentProperty: "val",
6059
- dataType: "number",
6060
- timeSeriesIndex: true,
6061
- quantile: true,
6062
- influxdbDataType: "intField"
6063
- /* intField */
6064
- },
6065
- {
6066
- fieldName: "connectionPoolCount",
6067
- gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE,
6068
- instrumentProperty: "val",
6069
- dataType: "number",
6070
- influxdbDataType: "intField"
6071
- /* intField */
6072
- },
6073
- {
6074
- fieldName: "connectionIdleCount",
6075
- gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE,
6076
- instrumentProperty: "val",
6077
- dataType: "number",
6078
- influxdbDataType: "intField"
6079
- /* intField */
6080
- },
6081
- {
6082
- fieldName: "connectionWaitingCount",
6083
- gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE,
6084
- instrumentProperty: "val",
6085
- dataType: "number",
6086
- influxdbDataType: "intField"
6087
- /* intField */
6088
- },
6089
- {
6090
- fieldName: "systemcpu",
6091
- gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE,
6092
- instrumentProperty: "val",
6093
- dataType: "number",
6094
- timeSeriesIndex: true,
6095
- quantile: true,
6096
- influxdbDataType: "floatField"
6097
- /* floatField */
6098
- },
6099
- {
6100
- fieldName: "memory",
6101
- gauge: Gauge.OBJECT_GAUGE,
6102
- instrumentProperty: "val",
6103
- dataType: "JSON",
6104
- influxdbDataType: "stringField"
6105
- /* stringField */
6106
- }
5976
+ { fieldName: "cpu", gauge: Gauge.CPU_LOAD_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5977
+ { fieldName: "connectionCount", gauge: Gauge.CONNECTION_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5978
+ { fieldName: "connectionPoolCount", gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5979
+ { fieldName: "connectionIdleCount", gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5980
+ { fieldName: "connectionWaitingCount", gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5981
+ { fieldName: "systemcpu", gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
5982
+ { fieldName: "memory", gauge: Gauge.OBJECT_GAUGE, instrumentProperty: "val", dataType: "JSON", influxdbDataType: "stringField", gaugeType: GaugeTypes.INSTRUMENT_OBJECT }
6107
5983
  ],
6108
5984
  //@@ need type declare in appframework
6109
5985
  GetPathFromContext(context) {