@nsshunt/stsvueutils 1.0.78 → 1.0.79

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.
@@ -1,5 +1,5 @@
1
1
  (function(global2, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("debug"), require("@nsshunt/stsinstrumentation"), require("@nsshunt/stsutils"), require("pinia")) : typeof define === "function" && define.amd ? define(["exports", "vue", "debug", "@nsshunt/stsinstrumentation", "@nsshunt/stsutils", "pinia"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2["@nsshunt/stsvueutils"] = {}, global2.vue, global2.debug, global2.stsinstrumentation, global2.stsutils, global2.pinia));
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("debug"), require("@nsshunt/stsinstrumentation"), require("@nsshunt/stsutils"), require("pinia"), require("socket.io-client")) : typeof define === "function" && define.amd ? define(["exports", "vue", "debug", "@nsshunt/stsinstrumentation", "@nsshunt/stsutils", "pinia", "socket.io-client"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2["@nsshunt/stsvueutils"] = {}, global2.vue, global2.debug, global2.stsinstrumentation, global2.stsutils, global2.pinia));
3
3
  })(this, function(exports2, vue, debugModule, stsinstrumentation, stsutils, pinia) {
4
4
  "use strict";var __defProp = Object.defineProperty;
5
5
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -999,6 +999,37 @@ var __privateMethod = (obj, member, method) => {
999
999
  __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
1000
1000
  return value;
1001
1001
  };
1002
+ var Gauge = /* @__PURE__ */ ((Gauge2) => {
1003
+ Gauge2["ACTIVE_REQUEST_GAUGE"] = "a";
1004
+ Gauge2["AUTHENTICATION_COUNT_GAUGE"] = "b";
1005
+ Gauge2["AUTHENTICATION_ERROR_COUNT_GAUGE"] = "aa";
1006
+ Gauge2["AUTHENTICATION_RETRY_COUNT_GAUGE"] = "ab";
1007
+ Gauge2["CONNECTION_POOL_IDLE_GAUGE"] = "c";
1008
+ Gauge2["CONNECTION_POOL_TOTAL_GAUGE"] = "d";
1009
+ Gauge2["CONNECTION_POOL_WAITING_GAUGE"] = "e";
1010
+ Gauge2["CPU_LOAD_GAUGE"] = "f";
1011
+ Gauge2["CPU_SYSTEM_LOAD_GAUGE"] = "g";
1012
+ Gauge2["DURATION_GAUGE"] = "h";
1013
+ Gauge2["DURATION_HISTOGRAM_GAUGE"] = "i";
1014
+ Gauge2["ERROR_COUNT_GAUGE"] = "j";
1015
+ Gauge2["LATENCY_GAUGE"] = "k";
1016
+ Gauge2["LATENCY_HISTOGRAM_GAUGE"] = "l";
1017
+ Gauge2["LOGGER"] = "m";
1018
+ Gauge2["LOGGER_COPY"] = "n";
1019
+ Gauge2["NETWORK_RX_GAUGE"] = "o";
1020
+ Gauge2["NETWORK_TX_GAUGE"] = "p";
1021
+ Gauge2["REQUEST_COUNT_GAUGE"] = "q";
1022
+ Gauge2["RETRY_COUNT_GAUGE"] = "r";
1023
+ Gauge2["TIMER_GAUGE"] = "s";
1024
+ Gauge2["VELOCITY_GAUGE"] = "t";
1025
+ Gauge2["CONNECTION_COUNT_GAUGE"] = "u";
1026
+ Gauge2["OBJECT_GAUGE"] = "v";
1027
+ Gauge2["PAYLOAD_SIZE"] = "w";
1028
+ Gauge2["CORE_COUNT_GAUGE"] = "x";
1029
+ Gauge2["CHILD_COUNT"] = "y";
1030
+ Gauge2["UNKNOWN"] = "z";
1031
+ return Gauge2;
1032
+ })(Gauge || {});
1002
1033
  var GaugeTypes = /* @__PURE__ */ ((GaugeTypes2) => {
1003
1034
  GaugeTypes2["GAUGE_TYPE"] = "_";
1004
1035
  GaugeTypes2["INSTRUMENT_GAUGE"] = "a";
@@ -3253,6 +3284,22 @@ var __privateMethod = (obj, member, method) => {
3253
3284
  ExtensionCodec2.defaultCodec = new ExtensionCodec2();
3254
3285
  return ExtensionCodec2;
3255
3286
  })();
3287
+ var SubscriptionTopic = /* @__PURE__ */ ((SubscriptionTopic2) => {
3288
+ SubscriptionTopic2["AllServicesCombined"] = "AllServicesCombined";
3289
+ SubscriptionTopic2["Services"] = "Services";
3290
+ SubscriptionTopic2["ServiceInstances"] = "ServiceInstances";
3291
+ SubscriptionTopic2["ServiceInstance"] = "ServiceInstance";
3292
+ SubscriptionTopic2["AllAgentsCombined"] = "AllAgentsCombined";
3293
+ SubscriptionTopic2["Agents"] = "Agents";
3294
+ SubscriptionTopic2["AgentWorkers"] = "AgentWorkers";
3295
+ SubscriptionTopic2["AgentWorker"] = "AgentWorker";
3296
+ SubscriptionTopic2["AllLambdasCombined"] = "AllLambdasCombined";
3297
+ SubscriptionTopic2["LambdaTechnologies"] = "LambdaTechnologies";
3298
+ SubscriptionTopic2["LambdaSubTechnologies"] = "LambdaSubTechnologies";
3299
+ SubscriptionTopic2["LambdaSubTechnologiesInstance"] = "LambdaSubTechnologiesInstance";
3300
+ SubscriptionTopic2["LogProcessing"] = "LogProcessing";
3301
+ return SubscriptionTopic2;
3302
+ })(SubscriptionTopic || {});
3256
3303
  const _ObservabilityModelUtils = class _ObservabilityModelUtils2 {
3257
3304
  static GetModelNode(data) {
3258
3305
  const fixedSize = 2;
@@ -3513,6 +3560,425 @@ var __privateMethod = (obj, member, method) => {
3513
3560
  byteToHex.push((i + 256).toString(16).slice(1));
3514
3561
  }
3515
3562
  typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
3563
+ ({
3564
+ coreFieldList: [
3565
+ {
3566
+ fieldName: "requestCount",
3567
+ gauge: Gauge.REQUEST_COUNT_GAUGE,
3568
+ instrumentProperty: "val",
3569
+ dataType: "number",
3570
+ influxdbDataType: "intField"
3571
+ /* intField */
3572
+ },
3573
+ {
3574
+ fieldName: "errorCount",
3575
+ gauge: Gauge.ERROR_COUNT_GAUGE,
3576
+ instrumentProperty: "val",
3577
+ dataType: "number",
3578
+ influxdbDataType: "intField"
3579
+ /* intField */
3580
+ },
3581
+ {
3582
+ fieldName: "retryCount",
3583
+ gauge: Gauge.RETRY_COUNT_GAUGE,
3584
+ instrumentProperty: "val",
3585
+ dataType: "number",
3586
+ influxdbDataType: "intField"
3587
+ /* intField */
3588
+ },
3589
+ {
3590
+ fieldName: "authenticationCount",
3591
+ gauge: Gauge.AUTHENTICATION_COUNT_GAUGE,
3592
+ instrumentProperty: "val",
3593
+ dataType: "number",
3594
+ influxdbDataType: "intField"
3595
+ /* intField */
3596
+ },
3597
+ {
3598
+ fieldName: "authenticationErrorCount",
3599
+ gauge: Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE,
3600
+ instrumentProperty: "val",
3601
+ dataType: "number",
3602
+ influxdbDataType: "intField"
3603
+ /* intField */
3604
+ },
3605
+ {
3606
+ fieldName: "authenticationRetryCount",
3607
+ gauge: Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE,
3608
+ instrumentProperty: "val",
3609
+ dataType: "number",
3610
+ influxdbDataType: "intField"
3611
+ /* intField */
3612
+ },
3613
+ {
3614
+ fieldName: "velocity",
3615
+ gauge: Gauge.VELOCITY_GAUGE,
3616
+ instrumentProperty: "va",
3617
+ dataType: "number",
3618
+ influxdbDataType: "floatField"
3619
+ /* floatField */
3620
+ },
3621
+ {
3622
+ fieldName: "activeRequestCount",
3623
+ gauge: Gauge.ACTIVE_REQUEST_GAUGE,
3624
+ instrumentProperty: "val",
3625
+ dataType: "number",
3626
+ timeSeriesIndex: true,
3627
+ quantile: true,
3628
+ influxdbDataType: "intField"
3629
+ /* intField */
3630
+ },
3631
+ {
3632
+ fieldName: "coreCount",
3633
+ gauge: Gauge.CORE_COUNT_GAUGE,
3634
+ instrumentProperty: "val",
3635
+ dataType: "number",
3636
+ influxdbDataType: "intField"
3637
+ /* intField */
3638
+ },
3639
+ {
3640
+ fieldName: "rx",
3641
+ gauge: Gauge.NETWORK_RX_GAUGE,
3642
+ instrumentProperty: "va",
3643
+ dataType: "number",
3644
+ influxdbDataType: "floatField"
3645
+ /* floatField */
3646
+ },
3647
+ {
3648
+ fieldName: "tx",
3649
+ gauge: Gauge.NETWORK_TX_GAUGE,
3650
+ instrumentProperty: "va",
3651
+ dataType: "number",
3652
+ influxdbDataType: "floatField"
3653
+ /* floatField */
3654
+ },
3655
+ {
3656
+ fieldName: "timer",
3657
+ gauge: Gauge.TIMER_GAUGE,
3658
+ instrumentProperty: "val",
3659
+ dataType: "number",
3660
+ influxdbDataType: "floatField"
3661
+ /* floatField */
3662
+ },
3663
+ {
3664
+ fieldName: "duration",
3665
+ gauge: Gauge.DURATION_GAUGE,
3666
+ instrumentProperty: "val",
3667
+ dataType: "number",
3668
+ timeSeriesIndex: true,
3669
+ quantile: true,
3670
+ influxdbDataType: "floatField",
3671
+ histo: [
3672
+ { label: "B10", bucketLimit: 10 },
3673
+ { label: "B20", bucketLimit: 20 },
3674
+ { label: "B50", bucketLimit: 50 },
3675
+ { label: "B100", bucketLimit: 100 },
3676
+ { label: "B1000", bucketLimit: 1e3 },
3677
+ { label: "B50000", bucketLimit: 5e4 },
3678
+ { label: "BInfinity", bucketLimit: -1 }
3679
+ ]
3680
+ },
3681
+ {
3682
+ fieldName: "latency",
3683
+ gauge: Gauge.LATENCY_GAUGE,
3684
+ instrumentProperty: "val",
3685
+ dataType: "number",
3686
+ timeSeriesIndex: true,
3687
+ quantile: true,
3688
+ influxdbDataType: "floatField",
3689
+ histo: [
3690
+ { label: "B10", bucketLimit: 10 },
3691
+ { label: "B20", bucketLimit: 20 },
3692
+ { label: "B50", bucketLimit: 50 },
3693
+ { label: "B100", bucketLimit: 100 },
3694
+ { label: "B1000", bucketLimit: 1e3 },
3695
+ { label: "B50000", bucketLimit: 5e4 },
3696
+ { label: "BInfinity", bucketLimit: -1 }
3697
+ ]
3698
+ }
3699
+ ],
3700
+ services: {
3701
+ ["service"]: {
3702
+ influxDBContextTags: [
3703
+ "serviceId",
3704
+ "serviceName",
3705
+ "serviceVersion",
3706
+ "serviceInstanceId",
3707
+ "serviceInstanceProcessId",
3708
+ "hostName",
3709
+ "pid",
3710
+ "ppid"
3711
+ ],
3712
+ redisIndexPrefixDefinitions: {
3713
+ timeSeriesIndex: "idx:serviceIndexTimeSeries",
3714
+ timeSeriesPrefix: "/serviceTimeSeries:",
3715
+ instantIndex: "idx:serviceIndexInstant",
3716
+ instantPrefix: "/serviceInstant:"
3717
+ },
3718
+ fieldList: [
3719
+ {
3720
+ fieldName: "cpu",
3721
+ gauge: Gauge.CPU_LOAD_GAUGE,
3722
+ instrumentProperty: "val",
3723
+ dataType: "number",
3724
+ timeSeriesIndex: true,
3725
+ quantile: true,
3726
+ influxdbDataType: "floatField"
3727
+ /* floatField */
3728
+ },
3729
+ {
3730
+ fieldName: "connectionCount",
3731
+ gauge: Gauge.CONNECTION_COUNT_GAUGE,
3732
+ instrumentProperty: "val",
3733
+ dataType: "number",
3734
+ timeSeriesIndex: true,
3735
+ quantile: true,
3736
+ influxdbDataType: "intField"
3737
+ /* intField */
3738
+ },
3739
+ {
3740
+ fieldName: "connectionPoolCount",
3741
+ gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE,
3742
+ instrumentProperty: "val",
3743
+ dataType: "number",
3744
+ influxdbDataType: "intField"
3745
+ /* intField */
3746
+ },
3747
+ {
3748
+ fieldName: "connectionIdleCount",
3749
+ gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE,
3750
+ instrumentProperty: "val",
3751
+ dataType: "number",
3752
+ influxdbDataType: "intField"
3753
+ /* intField */
3754
+ },
3755
+ {
3756
+ fieldName: "connectionWaitingCount",
3757
+ gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE,
3758
+ instrumentProperty: "val",
3759
+ dataType: "number",
3760
+ influxdbDataType: "intField"
3761
+ /* intField */
3762
+ },
3763
+ {
3764
+ fieldName: "systemcpu",
3765
+ gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE,
3766
+ instrumentProperty: "val",
3767
+ dataType: "number",
3768
+ timeSeriesIndex: true,
3769
+ quantile: true,
3770
+ influxdbDataType: "floatField"
3771
+ /* floatField */
3772
+ },
3773
+ {
3774
+ fieldName: "memory",
3775
+ gauge: Gauge.OBJECT_GAUGE,
3776
+ instrumentProperty: "val",
3777
+ dataType: "JSON",
3778
+ influxdbDataType: "stringField"
3779
+ /* stringField */
3780
+ }
3781
+ ],
3782
+ GetPathFromContext(context) {
3783
+ const { serviceId, serviceInstanceId, serviceInstanceProcessId } = context;
3784
+ return `/${serviceId}/${serviceInstanceId}/${serviceInstanceProcessId}`;
3785
+ },
3786
+ redisQueryFilters: {
3787
+ level1ContextField: "serviceType",
3788
+ level2ContextField: "appid",
3789
+ level3ContextField: "appinstanceid"
3790
+ },
3791
+ subscriptionTopics: [
3792
+ {
3793
+ subscriptionTopic: SubscriptionTopic.AllServicesCombined,
3794
+ route: "/metrics"
3795
+ },
3796
+ {
3797
+ subscriptionTopic: SubscriptionTopic.Services,
3798
+ route: "/metrics/services"
3799
+ },
3800
+ {
3801
+ subscriptionTopic: SubscriptionTopic.ServiceInstances,
3802
+ route: "/metrics/services/:key"
3803
+ },
3804
+ {
3805
+ subscriptionTopic: SubscriptionTopic.ServiceInstance,
3806
+ route: "/metrics/services/:key/:subkey"
3807
+ }
3808
+ ]
3809
+ },
3810
+ ["agent"]: {
3811
+ influxDBContextTags: [
3812
+ "id",
3813
+ "hostName",
3814
+ "agentName",
3815
+ "threadId",
3816
+ "asyncRunnerId"
3817
+ ],
3818
+ redisIndexPrefixDefinitions: {
3819
+ timeSeriesIndex: "idx:agentIndexTimeSeries",
3820
+ timeSeriesPrefix: "/agentTimeSeries:",
3821
+ instantIndex: "idx:agentIndexInstant",
3822
+ instantPrefix: "/agentInstant:"
3823
+ },
3824
+ fieldList: [
3825
+ {
3826
+ fieldName: "childCount",
3827
+ gauge: Gauge.CHILD_COUNT,
3828
+ instrumentProperty: "val",
3829
+ dataType: "number",
3830
+ influxdbDataType: "intField"
3831
+ /* intField */
3832
+ }
3833
+ ],
3834
+ //@@ need type declare in appframework ?? agent does not use appframework ... perhaps stspublisher
3835
+ GetPathFromContext(context) {
3836
+ const { agentName, threadId, asyncRunnerId } = context;
3837
+ return `/${agentName}/${threadId}/${asyncRunnerId}`;
3838
+ },
3839
+ redisQueryFilters: {
3840
+ level1ContextField: "serviceType",
3841
+ level2ContextField: "appid",
3842
+ //@@ this should be named something else
3843
+ level3ContextField: "appinstanceid"
3844
+ //@@ this should be named something else
3845
+ },
3846
+ subscriptionTopics: [
3847
+ {
3848
+ subscriptionTopic: SubscriptionTopic.AllAgentsCombined,
3849
+ route: "/metrics"
3850
+ },
3851
+ {
3852
+ subscriptionTopic: SubscriptionTopic.Agents,
3853
+ route: "/metrics/agents"
3854
+ },
3855
+ {
3856
+ subscriptionTopic: SubscriptionTopic.AgentWorkers,
3857
+ route: "/metrics/agents/:key"
3858
+ },
3859
+ {
3860
+ subscriptionTopic: SubscriptionTopic.AgentWorker,
3861
+ route: "/metrics/agents/:key/:subkey"
3862
+ }
3863
+ ]
3864
+ },
3865
+ ["lambda"]: {
3866
+ influxDBContextTags: [
3867
+ "technology",
3868
+ "subTechnology",
3869
+ "lambdaFunctionName",
3870
+ "lambdaInstance",
3871
+ "hostName",
3872
+ "processId",
3873
+ "parentProcessId",
3874
+ "useCase",
3875
+ "pattern"
3876
+ ],
3877
+ redisIndexPrefixDefinitions: {
3878
+ timeSeriesIndex: "idx:lambdaIndexTimeSeries",
3879
+ timeSeriesPrefix: "/lambdaTimeSeries:",
3880
+ instantIndex: "idx:lambdaIndexInstant",
3881
+ instantPrefix: "/lambdaInstant:"
3882
+ },
3883
+ fieldList: [
3884
+ {
3885
+ fieldName: "cpu",
3886
+ gauge: Gauge.CPU_LOAD_GAUGE,
3887
+ instrumentProperty: "val",
3888
+ dataType: "number",
3889
+ timeSeriesIndex: true,
3890
+ quantile: true,
3891
+ influxdbDataType: "floatField"
3892
+ /* floatField */
3893
+ },
3894
+ {
3895
+ fieldName: "connectionCount",
3896
+ gauge: Gauge.CONNECTION_COUNT_GAUGE,
3897
+ instrumentProperty: "val",
3898
+ dataType: "number",
3899
+ timeSeriesIndex: true,
3900
+ quantile: true,
3901
+ influxdbDataType: "intField"
3902
+ /* intField */
3903
+ },
3904
+ {
3905
+ fieldName: "connectionPoolCount",
3906
+ gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE,
3907
+ instrumentProperty: "val",
3908
+ dataType: "number",
3909
+ influxdbDataType: "intField"
3910
+ /* intField */
3911
+ },
3912
+ {
3913
+ fieldName: "connectionIdleCount",
3914
+ gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE,
3915
+ instrumentProperty: "val",
3916
+ dataType: "number",
3917
+ influxdbDataType: "intField"
3918
+ /* intField */
3919
+ },
3920
+ {
3921
+ fieldName: "connectionWaitingCount",
3922
+ gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE,
3923
+ instrumentProperty: "val",
3924
+ dataType: "number",
3925
+ influxdbDataType: "intField"
3926
+ /* intField */
3927
+ },
3928
+ {
3929
+ fieldName: "systemcpu",
3930
+ gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE,
3931
+ instrumentProperty: "val",
3932
+ dataType: "number",
3933
+ timeSeriesIndex: true,
3934
+ quantile: true,
3935
+ influxdbDataType: "floatField"
3936
+ /* floatField */
3937
+ },
3938
+ {
3939
+ fieldName: "memory",
3940
+ gauge: Gauge.OBJECT_GAUGE,
3941
+ instrumentProperty: "val",
3942
+ dataType: "JSON",
3943
+ influxdbDataType: "stringField"
3944
+ /* stringField */
3945
+ }
3946
+ ],
3947
+ //@@ need type declare in appframework
3948
+ GetPathFromContext(context) {
3949
+ const { technology, subTechnology, lambdaInstance } = context;
3950
+ return `/${technology}/${subTechnology}/${lambdaInstance}`;
3951
+ },
3952
+ redisQueryFilters: {
3953
+ level1ContextField: "serviceType",
3954
+ level2ContextField: "technology",
3955
+ level3ContextField: "subTechnology"
3956
+ },
3957
+ subscriptionTopics: [
3958
+ {
3959
+ subscriptionTopic: SubscriptionTopic.AllLambdasCombined,
3960
+ // uicontrollerlanding
3961
+ route: "/metrics"
3962
+ },
3963
+ {
3964
+ subscriptionTopic: SubscriptionTopic.LambdaTechnologies,
3965
+ // uicontrollerlambda
3966
+ route: "/metrics/lambdas"
3967
+ },
3968
+ {
3969
+ subscriptionTopic: SubscriptionTopic.LambdaSubTechnologies,
3970
+ // uicontrollerlambdasubtechnologies
3971
+ route: "/metrics/lambdas/:key"
3972
+ },
3973
+ {
3974
+ subscriptionTopic: SubscriptionTopic.LambdaSubTechnologiesInstance,
3975
+ // uicontrollerlambdasubtechnologiesinstance
3976
+ route: "/metrics/lambdas/:key/:subkey"
3977
+ }
3978
+ ]
3979
+ }
3980
+ }
3981
+ });
3516
3982
  var ansiStyles$1 = { exports: {} };
3517
3983
  var colorName;
3518
3984
  var hasRequiredColorName;