@nsshunt/stsobservability 0.0.5 → 0.0.7

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.
@@ -6523,6 +6523,431 @@ var __privateMethod = (obj, member, method) => {
6523
6523
  }
6524
6524
  });
6525
6525
  };
6526
+ var influxDBDataType = /* @__PURE__ */ ((influxDBDataType2) => {
6527
+ influxDBDataType2["intField"] = "intField";
6528
+ influxDBDataType2["floatField"] = "floatField";
6529
+ influxDBDataType2["stringField"] = "stringField";
6530
+ return influxDBDataType2;
6531
+ })(influxDBDataType || {});
6532
+ const globalServiceDefinitions = {
6533
+ coreFieldList: [
6534
+ {
6535
+ fieldName: "requestCount",
6536
+ gauge: Gauge.REQUEST_COUNT_GAUGE,
6537
+ instrumentProperty: "val",
6538
+ dataType: "number",
6539
+ influxdbDataType: "intField"
6540
+ /* intField */
6541
+ },
6542
+ {
6543
+ fieldName: "errorCount",
6544
+ gauge: Gauge.ERROR_COUNT_GAUGE,
6545
+ instrumentProperty: "val",
6546
+ dataType: "number",
6547
+ influxdbDataType: "intField"
6548
+ /* intField */
6549
+ },
6550
+ {
6551
+ fieldName: "retryCount",
6552
+ gauge: Gauge.RETRY_COUNT_GAUGE,
6553
+ instrumentProperty: "val",
6554
+ dataType: "number",
6555
+ influxdbDataType: "intField"
6556
+ /* intField */
6557
+ },
6558
+ {
6559
+ fieldName: "authenticationCount",
6560
+ gauge: Gauge.AUTHENTICATION_COUNT_GAUGE,
6561
+ instrumentProperty: "val",
6562
+ dataType: "number",
6563
+ influxdbDataType: "intField"
6564
+ /* intField */
6565
+ },
6566
+ {
6567
+ fieldName: "authenticationErrorCount",
6568
+ gauge: Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE,
6569
+ instrumentProperty: "val",
6570
+ dataType: "number",
6571
+ influxdbDataType: "intField"
6572
+ /* intField */
6573
+ },
6574
+ {
6575
+ fieldName: "authenticationRetryCount",
6576
+ gauge: Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE,
6577
+ instrumentProperty: "val",
6578
+ dataType: "number",
6579
+ influxdbDataType: "intField"
6580
+ /* intField */
6581
+ },
6582
+ {
6583
+ fieldName: "velocity",
6584
+ gauge: Gauge.VELOCITY_GAUGE,
6585
+ instrumentProperty: "va",
6586
+ dataType: "number",
6587
+ influxdbDataType: "floatField"
6588
+ /* floatField */
6589
+ },
6590
+ {
6591
+ fieldName: "activeRequestCount",
6592
+ gauge: Gauge.ACTIVE_REQUEST_GAUGE,
6593
+ instrumentProperty: "val",
6594
+ dataType: "number",
6595
+ timeSeriesIndex: true,
6596
+ quantile: true,
6597
+ influxdbDataType: "intField"
6598
+ /* intField */
6599
+ },
6600
+ {
6601
+ fieldName: "coreCount",
6602
+ gauge: Gauge.CORE_COUNT_GAUGE,
6603
+ instrumentProperty: "val",
6604
+ dataType: "number",
6605
+ influxdbDataType: "intField"
6606
+ /* intField */
6607
+ },
6608
+ {
6609
+ fieldName: "rx",
6610
+ gauge: Gauge.NETWORK_RX_GAUGE,
6611
+ instrumentProperty: "va",
6612
+ dataType: "number",
6613
+ influxdbDataType: "floatField"
6614
+ /* floatField */
6615
+ },
6616
+ {
6617
+ fieldName: "tx",
6618
+ gauge: Gauge.NETWORK_TX_GAUGE,
6619
+ instrumentProperty: "va",
6620
+ dataType: "number",
6621
+ influxdbDataType: "floatField"
6622
+ /* floatField */
6623
+ },
6624
+ {
6625
+ fieldName: "timer",
6626
+ gauge: Gauge.TIMER_GAUGE,
6627
+ instrumentProperty: "val",
6628
+ dataType: "number",
6629
+ influxdbDataType: "floatField"
6630
+ /* floatField */
6631
+ },
6632
+ {
6633
+ fieldName: "duration",
6634
+ gauge: Gauge.DURATION_GAUGE,
6635
+ instrumentProperty: "val",
6636
+ dataType: "number",
6637
+ timeSeriesIndex: true,
6638
+ quantile: true,
6639
+ influxdbDataType: "floatField",
6640
+ histo: [
6641
+ { label: "B10", bucketLimit: 10 },
6642
+ { label: "B20", bucketLimit: 20 },
6643
+ { label: "B50", bucketLimit: 50 },
6644
+ { label: "B100", bucketLimit: 100 },
6645
+ { label: "B1000", bucketLimit: 1e3 },
6646
+ { label: "B50000", bucketLimit: 5e4 },
6647
+ { label: "BInfinity", bucketLimit: -1 }
6648
+ ]
6649
+ },
6650
+ {
6651
+ fieldName: "latency",
6652
+ gauge: Gauge.LATENCY_GAUGE,
6653
+ instrumentProperty: "val",
6654
+ dataType: "number",
6655
+ timeSeriesIndex: true,
6656
+ quantile: true,
6657
+ influxdbDataType: "floatField",
6658
+ histo: [
6659
+ { label: "B10", bucketLimit: 10 },
6660
+ { label: "B20", bucketLimit: 20 },
6661
+ { label: "B50", bucketLimit: 50 },
6662
+ { label: "B100", bucketLimit: 100 },
6663
+ { label: "B1000", bucketLimit: 1e3 },
6664
+ { label: "B50000", bucketLimit: 5e4 },
6665
+ { label: "BInfinity", bucketLimit: -1 }
6666
+ ]
6667
+ }
6668
+ ],
6669
+ services: {
6670
+ ["service"]: {
6671
+ influxDBContextTags: [
6672
+ "serviceId",
6673
+ "serviceName",
6674
+ "serviceVersion",
6675
+ "serviceInstanceId",
6676
+ "serviceInstanceProcessId",
6677
+ "hostName",
6678
+ "pid",
6679
+ "ppid"
6680
+ ],
6681
+ redisIndexPrefixDefinitions: {
6682
+ timeSeriesIndex: "idx:serviceIndexTimeSeries",
6683
+ timeSeriesPrefix: "/serviceTimeSeries:",
6684
+ instantIndex: "idx:serviceIndexInstant",
6685
+ instantPrefix: "/serviceInstant:"
6686
+ },
6687
+ fieldList: [
6688
+ {
6689
+ fieldName: "cpu",
6690
+ gauge: Gauge.CPU_LOAD_GAUGE,
6691
+ instrumentProperty: "val",
6692
+ dataType: "number",
6693
+ timeSeriesIndex: true,
6694
+ quantile: true,
6695
+ influxdbDataType: "floatField"
6696
+ /* floatField */
6697
+ },
6698
+ {
6699
+ fieldName: "connectionCount",
6700
+ gauge: Gauge.CONNECTION_COUNT_GAUGE,
6701
+ instrumentProperty: "val",
6702
+ dataType: "number",
6703
+ timeSeriesIndex: true,
6704
+ quantile: true,
6705
+ influxdbDataType: "intField"
6706
+ /* intField */
6707
+ },
6708
+ {
6709
+ fieldName: "connectionPoolCount",
6710
+ gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE,
6711
+ instrumentProperty: "val",
6712
+ dataType: "number",
6713
+ influxdbDataType: "intField"
6714
+ /* intField */
6715
+ },
6716
+ {
6717
+ fieldName: "connectionIdleCount",
6718
+ gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE,
6719
+ instrumentProperty: "val",
6720
+ dataType: "number",
6721
+ influxdbDataType: "intField"
6722
+ /* intField */
6723
+ },
6724
+ {
6725
+ fieldName: "connectionWaitingCount",
6726
+ gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE,
6727
+ instrumentProperty: "val",
6728
+ dataType: "number",
6729
+ influxdbDataType: "intField"
6730
+ /* intField */
6731
+ },
6732
+ {
6733
+ fieldName: "systemcpu",
6734
+ gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE,
6735
+ instrumentProperty: "val",
6736
+ dataType: "number",
6737
+ timeSeriesIndex: true,
6738
+ quantile: true,
6739
+ influxdbDataType: "floatField"
6740
+ /* floatField */
6741
+ },
6742
+ {
6743
+ fieldName: "memory",
6744
+ gauge: Gauge.OBJECT_GAUGE,
6745
+ instrumentProperty: "val",
6746
+ dataType: "JSON",
6747
+ influxdbDataType: "stringField"
6748
+ /* stringField */
6749
+ }
6750
+ ],
6751
+ GetPathFromContext(context) {
6752
+ const { serviceId, serviceInstanceId, serviceInstanceProcessId } = context;
6753
+ return `/${serviceId}/${serviceInstanceId}/${serviceInstanceProcessId}`;
6754
+ },
6755
+ redisQueryFilters: {
6756
+ level1ContextField: "serviceType",
6757
+ level2ContextField: "appid",
6758
+ level3ContextField: "appinstanceid"
6759
+ },
6760
+ subscriptionTopics: [
6761
+ {
6762
+ subscriptionTopic: SubscriptionTopic.AllServicesCombined,
6763
+ route: "/metrics"
6764
+ },
6765
+ {
6766
+ subscriptionTopic: SubscriptionTopic.Services,
6767
+ route: "/metrics/services"
6768
+ },
6769
+ {
6770
+ subscriptionTopic: SubscriptionTopic.ServiceInstances,
6771
+ route: "/metrics/services/:key"
6772
+ },
6773
+ {
6774
+ subscriptionTopic: SubscriptionTopic.ServiceInstance,
6775
+ route: "/metrics/services/:key/:subkey"
6776
+ }
6777
+ ]
6778
+ },
6779
+ ["agent"]: {
6780
+ influxDBContextTags: [
6781
+ "id",
6782
+ "hostName",
6783
+ "agentName",
6784
+ "threadId",
6785
+ "asyncRunnerId"
6786
+ ],
6787
+ redisIndexPrefixDefinitions: {
6788
+ timeSeriesIndex: "idx:agentIndexTimeSeries",
6789
+ timeSeriesPrefix: "/agentTimeSeries:",
6790
+ instantIndex: "idx:agentIndexInstant",
6791
+ instantPrefix: "/agentInstant:"
6792
+ },
6793
+ fieldList: [
6794
+ {
6795
+ fieldName: "childCount",
6796
+ gauge: Gauge.CHILD_COUNT,
6797
+ instrumentProperty: "val",
6798
+ dataType: "number",
6799
+ influxdbDataType: "intField"
6800
+ /* intField */
6801
+ }
6802
+ ],
6803
+ //@@ need type declare in appframework ?? agent does not use appframework ... perhaps stspublisher
6804
+ GetPathFromContext(context) {
6805
+ const { agentName, threadId, asyncRunnerId } = context;
6806
+ return `/${agentName}/${threadId}/${asyncRunnerId}`;
6807
+ },
6808
+ redisQueryFilters: {
6809
+ level1ContextField: "serviceType",
6810
+ level2ContextField: "appid",
6811
+ //@@ this should be named something else
6812
+ level3ContextField: "appinstanceid"
6813
+ //@@ this should be named something else
6814
+ },
6815
+ subscriptionTopics: [
6816
+ {
6817
+ subscriptionTopic: SubscriptionTopic.AllAgentsCombined,
6818
+ route: "/metrics"
6819
+ },
6820
+ {
6821
+ subscriptionTopic: SubscriptionTopic.Agents,
6822
+ route: "/metrics/agents"
6823
+ },
6824
+ {
6825
+ subscriptionTopic: SubscriptionTopic.AgentWorkers,
6826
+ route: "/metrics/agents/:key"
6827
+ },
6828
+ {
6829
+ subscriptionTopic: SubscriptionTopic.AgentWorker,
6830
+ route: "/metrics/agents/:key/:subkey"
6831
+ }
6832
+ ]
6833
+ },
6834
+ ["lambda"]: {
6835
+ influxDBContextTags: [
6836
+ "technology",
6837
+ "subTechnology",
6838
+ "lambdaFunctionName",
6839
+ "lambdaInstance",
6840
+ "hostName",
6841
+ "processId",
6842
+ "parentProcessId",
6843
+ "useCase",
6844
+ "pattern"
6845
+ ],
6846
+ redisIndexPrefixDefinitions: {
6847
+ timeSeriesIndex: "idx:lambdaIndexTimeSeries",
6848
+ timeSeriesPrefix: "/lambdaTimeSeries:",
6849
+ instantIndex: "idx:lambdaIndexInstant",
6850
+ instantPrefix: "/lambdaInstant:"
6851
+ },
6852
+ fieldList: [
6853
+ {
6854
+ fieldName: "cpu",
6855
+ gauge: Gauge.CPU_LOAD_GAUGE,
6856
+ instrumentProperty: "val",
6857
+ dataType: "number",
6858
+ timeSeriesIndex: true,
6859
+ quantile: true,
6860
+ influxdbDataType: "floatField"
6861
+ /* floatField */
6862
+ },
6863
+ {
6864
+ fieldName: "connectionCount",
6865
+ gauge: Gauge.CONNECTION_COUNT_GAUGE,
6866
+ instrumentProperty: "val",
6867
+ dataType: "number",
6868
+ timeSeriesIndex: true,
6869
+ quantile: true,
6870
+ influxdbDataType: "intField"
6871
+ /* intField */
6872
+ },
6873
+ {
6874
+ fieldName: "connectionPoolCount",
6875
+ gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE,
6876
+ instrumentProperty: "val",
6877
+ dataType: "number",
6878
+ influxdbDataType: "intField"
6879
+ /* intField */
6880
+ },
6881
+ {
6882
+ fieldName: "connectionIdleCount",
6883
+ gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE,
6884
+ instrumentProperty: "val",
6885
+ dataType: "number",
6886
+ influxdbDataType: "intField"
6887
+ /* intField */
6888
+ },
6889
+ {
6890
+ fieldName: "connectionWaitingCount",
6891
+ gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE,
6892
+ instrumentProperty: "val",
6893
+ dataType: "number",
6894
+ influxdbDataType: "intField"
6895
+ /* intField */
6896
+ },
6897
+ {
6898
+ fieldName: "systemcpu",
6899
+ gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE,
6900
+ instrumentProperty: "val",
6901
+ dataType: "number",
6902
+ timeSeriesIndex: true,
6903
+ quantile: true,
6904
+ influxdbDataType: "floatField"
6905
+ /* floatField */
6906
+ },
6907
+ {
6908
+ fieldName: "memory",
6909
+ gauge: Gauge.OBJECT_GAUGE,
6910
+ instrumentProperty: "val",
6911
+ dataType: "JSON",
6912
+ influxdbDataType: "stringField"
6913
+ /* stringField */
6914
+ }
6915
+ ],
6916
+ //@@ need type declare in appframework
6917
+ GetPathFromContext(context) {
6918
+ const { technology, subTechnology, lambdaInstance } = context;
6919
+ return `/${technology}/${subTechnology}/${lambdaInstance}`;
6920
+ },
6921
+ redisQueryFilters: {
6922
+ level1ContextField: "serviceType",
6923
+ level2ContextField: "technology",
6924
+ level3ContextField: "subTechnology"
6925
+ },
6926
+ subscriptionTopics: [
6927
+ {
6928
+ subscriptionTopic: SubscriptionTopic.AllLambdasCombined,
6929
+ // uicontrollerlanding
6930
+ route: "/metrics"
6931
+ },
6932
+ {
6933
+ subscriptionTopic: SubscriptionTopic.LambdaTechnologies,
6934
+ // uicontrollerlambda
6935
+ route: "/metrics/lambdas"
6936
+ },
6937
+ {
6938
+ subscriptionTopic: SubscriptionTopic.LambdaSubTechnologies,
6939
+ // uicontrollerlambdasubtechnologies
6940
+ route: "/metrics/lambdas/:key"
6941
+ },
6942
+ {
6943
+ subscriptionTopic: SubscriptionTopic.LambdaSubTechnologiesInstance,
6944
+ // uicontrollerlambdasubtechnologiesinstance
6945
+ route: "/metrics/lambdas/:key/:subkey"
6946
+ }
6947
+ ]
6948
+ }
6949
+ }
6950
+ };
6526
6951
  exports2.AgentInstrumentController = AgentInstrumentController;
6527
6952
  exports2.CompareSTSInstrumentControllerPluginKey = CompareSTSInstrumentControllerPluginKey;
6528
6953
  exports2.CreateInstrument = CreateInstrument;
@@ -6573,6 +6998,8 @@ var __privateMethod = (obj, member, method) => {
6573
6998
  exports2.SubscriptionTopic = SubscriptionTopic;
6574
6999
  exports2.TransportType = TransportType;
6575
7000
  exports2.ePublishState = ePublishState;
7001
+ exports2.globalServiceDefinitions = globalServiceDefinitions;
7002
+ exports2.influxDBDataType = influxDBDataType;
6576
7003
  exports2.useSTSInstrumentControllerPlugin = useSTSInstrumentControllerPlugin;
6577
7004
  Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
6578
7005
  });