@nsshunt/stsvueutils 1.0.81 → 1.0.83

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.
@@ -3489,70 +3489,24 @@ var __privateMethod = (obj, member, method) => {
3489
3489
  model.instruments[gaugeName] = _ObservabilityModelUtils.GetModelNodeObject({});
3490
3490
  }
3491
3491
  });
3492
- debugModule(`proc:${process.pid}`);
3493
3492
  const byteToHex = [];
3494
3493
  for (let i = 0; i < 256; ++i) {
3495
3494
  byteToHex.push((i + 256).toString(16).slice(1));
3496
3495
  }
3497
3496
  typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
3497
+ const instrumentationObservationInterval = 1e3;
3498
+ const instrumentationTimeWindow = 600;
3499
+ const consoleLogging = true;
3500
+ const instrumentLogging = true;
3498
3501
  ({
3499
3502
  coreFieldList: [
3500
- {
3501
- fieldName: "requestCount",
3502
- gauge: Gauge.REQUEST_COUNT_GAUGE,
3503
- instrumentProperty: "val",
3504
- dataType: "number",
3505
- influxdbDataType: "intField"
3506
- /* intField */
3507
- },
3508
- {
3509
- fieldName: "errorCount",
3510
- gauge: Gauge.ERROR_COUNT_GAUGE,
3511
- instrumentProperty: "val",
3512
- dataType: "number",
3513
- influxdbDataType: "intField"
3514
- /* intField */
3515
- },
3516
- {
3517
- fieldName: "retryCount",
3518
- gauge: Gauge.RETRY_COUNT_GAUGE,
3519
- instrumentProperty: "val",
3520
- dataType: "number",
3521
- influxdbDataType: "intField"
3522
- /* intField */
3523
- },
3524
- {
3525
- fieldName: "authenticationCount",
3526
- gauge: Gauge.AUTHENTICATION_COUNT_GAUGE,
3527
- instrumentProperty: "val",
3528
- dataType: "number",
3529
- influxdbDataType: "intField"
3530
- /* intField */
3531
- },
3532
- {
3533
- fieldName: "authenticationErrorCount",
3534
- gauge: Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE,
3535
- instrumentProperty: "val",
3536
- dataType: "number",
3537
- influxdbDataType: "intField"
3538
- /* intField */
3539
- },
3540
- {
3541
- fieldName: "authenticationRetryCount",
3542
- gauge: Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE,
3543
- instrumentProperty: "val",
3544
- dataType: "number",
3545
- influxdbDataType: "intField"
3546
- /* intField */
3547
- },
3548
- {
3549
- fieldName: "velocity",
3550
- gauge: Gauge.VELOCITY_GAUGE,
3551
- instrumentProperty: "va",
3552
- dataType: "number",
3553
- influxdbDataType: "floatField"
3554
- /* floatField */
3555
- },
3503
+ { fieldName: "requestCount", gauge: Gauge.REQUEST_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3504
+ { fieldName: "errorCount", gauge: Gauge.ERROR_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3505
+ { fieldName: "retryCount", gauge: Gauge.RETRY_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3506
+ { fieldName: "authenticationCount", gauge: Gauge.AUTHENTICATION_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3507
+ { fieldName: "authenticationErrorCount", gauge: Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3508
+ { fieldName: "authenticationRetryCount", gauge: Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3509
+ { fieldName: "velocity", gauge: Gauge.VELOCITY_GAUGE, instrumentProperty: "va", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },
3556
3510
  {
3557
3511
  fieldName: "activeRequestCount",
3558
3512
  gauge: Gauge.ACTIVE_REQUEST_GAUGE,
@@ -3560,41 +3514,17 @@ var __privateMethod = (obj, member, method) => {
3560
3514
  dataType: "number",
3561
3515
  timeSeriesIndex: true,
3562
3516
  quantile: true,
3563
- influxdbDataType: "intField"
3564
- /* intField */
3565
- },
3566
- {
3567
- fieldName: "coreCount",
3568
- gauge: Gauge.CORE_COUNT_GAUGE,
3569
- instrumentProperty: "val",
3570
- dataType: "number",
3571
- influxdbDataType: "intField"
3572
- /* intField */
3573
- },
3574
- {
3575
- fieldName: "rx",
3576
- gauge: Gauge.NETWORK_RX_GAUGE,
3577
- instrumentProperty: "va",
3578
- dataType: "number",
3579
- influxdbDataType: "floatField"
3580
- /* floatField */
3581
- },
3582
- {
3583
- fieldName: "tx",
3584
- gauge: Gauge.NETWORK_TX_GAUGE,
3585
- instrumentProperty: "va",
3586
- dataType: "number",
3587
- influxdbDataType: "floatField"
3588
- /* floatField */
3589
- },
3590
- {
3591
- fieldName: "timer",
3592
- gauge: Gauge.TIMER_GAUGE,
3593
- instrumentProperty: "val",
3594
- dataType: "number",
3595
- influxdbDataType: "floatField"
3596
- /* floatField */
3517
+ influxdbDataType: "intField",
3518
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3519
+ instrumentOptions: {
3520
+ interval: instrumentationObservationInterval,
3521
+ sampleSize: instrumentationTimeWindow
3522
+ }
3597
3523
  },
3524
+ { fieldName: "coreCount", gauge: Gauge.CORE_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3525
+ { fieldName: "rx", gauge: Gauge.NETWORK_RX_GAUGE, instrumentProperty: "va", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },
3526
+ { fieldName: "tx", gauge: Gauge.NETWORK_TX_GAUGE, instrumentProperty: "va", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },
3527
+ { fieldName: "timer", gauge: Gauge.TIMER_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_TIMER },
3598
3528
  {
3599
3529
  fieldName: "duration",
3600
3530
  gauge: Gauge.DURATION_GAUGE,
@@ -3603,6 +3533,11 @@ var __privateMethod = (obj, member, method) => {
3603
3533
  timeSeriesIndex: true,
3604
3534
  quantile: true,
3605
3535
  influxdbDataType: "floatField",
3536
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3537
+ instrumentOptions: {
3538
+ interval: instrumentationObservationInterval,
3539
+ sampleSize: instrumentationTimeWindow
3540
+ },
3606
3541
  histo: [
3607
3542
  { label: "B10", bucketLimit: 10 },
3608
3543
  { label: "B20", bucketLimit: 20 },
@@ -3611,7 +3546,8 @@ var __privateMethod = (obj, member, method) => {
3611
3546
  { label: "B1000", bucketLimit: 1e3 },
3612
3547
  { label: "B50000", bucketLimit: 5e4 },
3613
3548
  { label: "BInfinity", bucketLimit: -1 }
3614
- ]
3549
+ ],
3550
+ histoGaugeType: Gauge.DURATION_HISTOGRAM_GAUGE
3615
3551
  },
3616
3552
  {
3617
3553
  fieldName: "latency",
@@ -3621,6 +3557,11 @@ var __privateMethod = (obj, member, method) => {
3621
3557
  timeSeriesIndex: true,
3622
3558
  quantile: true,
3623
3559
  influxdbDataType: "floatField",
3560
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3561
+ instrumentOptions: {
3562
+ interval: instrumentationObservationInterval,
3563
+ sampleSize: instrumentationTimeWindow
3564
+ },
3624
3565
  histo: [
3625
3566
  { label: "B10", bucketLimit: 10 },
3626
3567
  { label: "B20", bucketLimit: 20 },
@@ -3629,7 +3570,24 @@ var __privateMethod = (obj, member, method) => {
3629
3570
  { label: "B1000", bucketLimit: 1e3 },
3630
3571
  { label: "B50000", bucketLimit: 5e4 },
3631
3572
  { label: "BInfinity", bucketLimit: -1 }
3632
- ]
3573
+ ],
3574
+ histoGaugeType: Gauge.LATENCY_HISTOGRAM_GAUGE
3575
+ }
3576
+ ],
3577
+ logFieldList: [
3578
+ {
3579
+ fieldName: "log",
3580
+ gauge: Gauge.LOGGER,
3581
+ instrumentProperty: "val",
3582
+ dataType: "string",
3583
+ timeSeriesIndex: false,
3584
+ quantile: false,
3585
+ influxdbDataType: "stringField",
3586
+ gaugeType: GaugeTypes.INSTRUMENT_LOG,
3587
+ instrumentOptions: {
3588
+ consoleLogging,
3589
+ instrumentLogging
3590
+ }
3633
3591
  }
3634
3592
  ],
3635
3593
  services: {
@@ -3658,8 +3616,12 @@ var __privateMethod = (obj, member, method) => {
3658
3616
  dataType: "number",
3659
3617
  timeSeriesIndex: true,
3660
3618
  quantile: true,
3661
- influxdbDataType: "floatField"
3662
- /* floatField */
3619
+ influxdbDataType: "floatField",
3620
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3621
+ instrumentOptions: {
3622
+ interval: instrumentationObservationInterval,
3623
+ sampleSize: instrumentationTimeWindow
3624
+ }
3663
3625
  },
3664
3626
  {
3665
3627
  fieldName: "connectionCount",
@@ -3668,50 +3630,27 @@ var __privateMethod = (obj, member, method) => {
3668
3630
  dataType: "number",
3669
3631
  timeSeriesIndex: true,
3670
3632
  quantile: true,
3671
- influxdbDataType: "intField"
3672
- /* intField */
3673
- },
3674
- {
3675
- fieldName: "connectionPoolCount",
3676
- gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE,
3677
- instrumentProperty: "val",
3678
- dataType: "number",
3679
- influxdbDataType: "intField"
3680
- /* intField */
3681
- },
3682
- {
3683
- fieldName: "connectionIdleCount",
3684
- gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE,
3685
- instrumentProperty: "val",
3686
- dataType: "number",
3687
- influxdbDataType: "intField"
3688
- /* intField */
3689
- },
3690
- {
3691
- fieldName: "connectionWaitingCount",
3692
- gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE,
3693
- instrumentProperty: "val",
3694
- dataType: "number",
3695
- influxdbDataType: "intField"
3696
- /* intField */
3697
- },
3698
- {
3699
- fieldName: "systemcpu",
3700
- gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE,
3701
- instrumentProperty: "val",
3702
- dataType: "number",
3703
- timeSeriesIndex: true,
3704
- quantile: true,
3705
- influxdbDataType: "floatField"
3706
- /* floatField */
3633
+ influxdbDataType: "intField",
3634
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3635
+ instrumentOptions: {
3636
+ interval: instrumentationObservationInterval,
3637
+ sampleSize: instrumentationTimeWindow
3638
+ }
3707
3639
  },
3640
+ { fieldName: "connectionPoolCount", gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3641
+ { fieldName: "connectionIdleCount", gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3642
+ { fieldName: "connectionWaitingCount", gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3643
+ { fieldName: "systemcpu", gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3708
3644
  {
3709
3645
  fieldName: "memory",
3710
3646
  gauge: Gauge.OBJECT_GAUGE,
3711
3647
  instrumentProperty: "val",
3712
3648
  dataType: "JSON",
3713
- influxdbDataType: "stringField"
3714
- /* stringField */
3649
+ influxdbDataType: "stringField",
3650
+ gaugeType: GaugeTypes.INSTRUMENT_OBJECT,
3651
+ instrumentOptions: {
3652
+ label: "InstrumentObjectMaster"
3653
+ }
3715
3654
  }
3716
3655
  ],
3717
3656
  GetPathFromContext(context) {
@@ -3757,14 +3696,7 @@ var __privateMethod = (obj, member, method) => {
3757
3696
  instantPrefix: "/agentInstant:"
3758
3697
  },
3759
3698
  fieldList: [
3760
- {
3761
- fieldName: "childCount",
3762
- gauge: Gauge.CHILD_COUNT,
3763
- instrumentProperty: "val",
3764
- dataType: "number",
3765
- influxdbDataType: "intField"
3766
- /* intField */
3767
- }
3699
+ { fieldName: "childCount", gauge: Gauge.CHILD_COUNT, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE }
3768
3700
  ],
3769
3701
  //@@ need type declare in appframework ?? agent does not use appframework ... perhaps stspublisher
3770
3702
  GetPathFromContext(context) {
@@ -3816,68 +3748,13 @@ var __privateMethod = (obj, member, method) => {
3816
3748
  instantPrefix: "/lambdaInstant:"
3817
3749
  },
3818
3750
  fieldList: [
3819
- {
3820
- fieldName: "cpu",
3821
- gauge: Gauge.CPU_LOAD_GAUGE,
3822
- instrumentProperty: "val",
3823
- dataType: "number",
3824
- timeSeriesIndex: true,
3825
- quantile: true,
3826
- influxdbDataType: "floatField"
3827
- /* floatField */
3828
- },
3829
- {
3830
- fieldName: "connectionCount",
3831
- gauge: Gauge.CONNECTION_COUNT_GAUGE,
3832
- instrumentProperty: "val",
3833
- dataType: "number",
3834
- timeSeriesIndex: true,
3835
- quantile: true,
3836
- influxdbDataType: "intField"
3837
- /* intField */
3838
- },
3839
- {
3840
- fieldName: "connectionPoolCount",
3841
- gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE,
3842
- instrumentProperty: "val",
3843
- dataType: "number",
3844
- influxdbDataType: "intField"
3845
- /* intField */
3846
- },
3847
- {
3848
- fieldName: "connectionIdleCount",
3849
- gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE,
3850
- instrumentProperty: "val",
3851
- dataType: "number",
3852
- influxdbDataType: "intField"
3853
- /* intField */
3854
- },
3855
- {
3856
- fieldName: "connectionWaitingCount",
3857
- gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE,
3858
- instrumentProperty: "val",
3859
- dataType: "number",
3860
- influxdbDataType: "intField"
3861
- /* intField */
3862
- },
3863
- {
3864
- fieldName: "systemcpu",
3865
- gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE,
3866
- instrumentProperty: "val",
3867
- dataType: "number",
3868
- timeSeriesIndex: true,
3869
- quantile: true,
3870
- influxdbDataType: "floatField"
3871
- /* floatField */
3872
- },
3873
- {
3874
- fieldName: "memory",
3875
- gauge: Gauge.OBJECT_GAUGE,
3876
- instrumentProperty: "val",
3877
- dataType: "JSON",
3878
- influxdbDataType: "stringField"
3879
- /* stringField */
3880
- }
3751
+ { fieldName: "cpu", gauge: Gauge.CPU_LOAD_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3752
+ { fieldName: "connectionCount", gauge: Gauge.CONNECTION_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3753
+ { fieldName: "connectionPoolCount", gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3754
+ { fieldName: "connectionIdleCount", gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3755
+ { fieldName: "connectionWaitingCount", gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3756
+ { fieldName: "systemcpu", gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3757
+ { fieldName: "memory", gauge: Gauge.OBJECT_GAUGE, instrumentProperty: "val", dataType: "JSON", influxdbDataType: "stringField", gaugeType: GaugeTypes.INSTRUMENT_OBJECT }
3881
3758
  ],
3882
3759
  //@@ need type declare in appframework
3883
3760
  GetPathFromContext(context) {
@@ -6047,6 +5924,7 @@ var __privateMethod = (obj, member, method) => {
6047
5924
  exports2.STSWorkerManagerPluginKey = STSWorkerManagerPluginKey;
6048
5925
  exports2.TelemetryStore = TelemetryStore;
6049
5926
  exports2.WorkerInstance = WorkerInstance;
5927
+ exports2.eIWMessageCommands = eIWMessageCommands;
6050
5928
  exports2.useSTSEmitterPlugin = useSTSEmitterPlugin;
6051
5929
  exports2.useSTSStoragePlugin = useSTSStoragePlugin;
6052
5930
  exports2.useSTSWorkerManager = useSTSWorkerManager;