@nsshunt/stsvueutils 1.0.82 → 1.0.84

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.
@@ -3235,6 +3235,303 @@ var __privateMethod = (obj, member, method) => {
3235
3235
  SubscriptionTopic2["LogProcessing"] = "LogProcessing";
3236
3236
  return SubscriptionTopic2;
3237
3237
  })(SubscriptionTopic || {});
3238
+ const instrumentationObservationInterval = 1e3;
3239
+ const instrumentationTimeWindow = 600;
3240
+ const consoleLogging = true;
3241
+ const instrumentLogging = true;
3242
+ const globalServiceDefinitions = {
3243
+ coreFieldList: [
3244
+ { fieldName: "requestCount", gauge: Gauge.REQUEST_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3245
+ { fieldName: "errorCount", gauge: Gauge.ERROR_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3246
+ { fieldName: "retryCount", gauge: Gauge.RETRY_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3247
+ { fieldName: "authenticationCount", gauge: Gauge.AUTHENTICATION_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3248
+ { fieldName: "authenticationErrorCount", gauge: Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3249
+ { fieldName: "authenticationRetryCount", gauge: Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3250
+ { fieldName: "velocity", gauge: Gauge.VELOCITY_GAUGE, instrumentProperty: "va", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },
3251
+ {
3252
+ fieldName: "activeRequestCount",
3253
+ gauge: Gauge.ACTIVE_REQUEST_GAUGE,
3254
+ instrumentProperty: "val",
3255
+ dataType: "number",
3256
+ timeSeriesIndex: true,
3257
+ quantile: true,
3258
+ influxdbDataType: "intField",
3259
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3260
+ instrumentOptions: {
3261
+ interval: instrumentationObservationInterval,
3262
+ sampleSize: instrumentationTimeWindow
3263
+ }
3264
+ },
3265
+ { fieldName: "coreCount", gauge: Gauge.CORE_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3266
+ { fieldName: "rx", gauge: Gauge.NETWORK_RX_GAUGE, instrumentProperty: "va", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },
3267
+ { fieldName: "tx", gauge: Gauge.NETWORK_TX_GAUGE, instrumentProperty: "va", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_VELOCITY },
3268
+ { fieldName: "timer", gauge: Gauge.TIMER_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_TIMER },
3269
+ {
3270
+ fieldName: "duration",
3271
+ gauge: Gauge.DURATION_GAUGE,
3272
+ instrumentProperty: "val",
3273
+ dataType: "number",
3274
+ timeSeriesIndex: true,
3275
+ quantile: true,
3276
+ influxdbDataType: "floatField",
3277
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3278
+ instrumentOptions: {
3279
+ interval: instrumentationObservationInterval,
3280
+ sampleSize: instrumentationTimeWindow
3281
+ },
3282
+ histo: [
3283
+ { label: "B10", bucketLimit: 10 },
3284
+ { label: "B20", bucketLimit: 20 },
3285
+ { label: "B50", bucketLimit: 50 },
3286
+ { label: "B100", bucketLimit: 100 },
3287
+ { label: "B1000", bucketLimit: 1e3 },
3288
+ { label: "B50000", bucketLimit: 5e4 },
3289
+ { label: "BInfinity", bucketLimit: -1 }
3290
+ ],
3291
+ histoGauge: Gauge.DURATION_HISTOGRAM_GAUGE
3292
+ },
3293
+ {
3294
+ fieldName: "latency",
3295
+ gauge: Gauge.LATENCY_GAUGE,
3296
+ instrumentProperty: "val",
3297
+ dataType: "number",
3298
+ timeSeriesIndex: true,
3299
+ quantile: true,
3300
+ influxdbDataType: "floatField",
3301
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3302
+ instrumentOptions: {
3303
+ interval: instrumentationObservationInterval,
3304
+ sampleSize: instrumentationTimeWindow
3305
+ },
3306
+ histo: [
3307
+ { label: "B10", bucketLimit: 10 },
3308
+ { label: "B20", bucketLimit: 20 },
3309
+ { label: "B50", bucketLimit: 50 },
3310
+ { label: "B100", bucketLimit: 100 },
3311
+ { label: "B1000", bucketLimit: 1e3 },
3312
+ { label: "B50000", bucketLimit: 5e4 },
3313
+ { label: "BInfinity", bucketLimit: -1 }
3314
+ ],
3315
+ histoGauge: Gauge.LATENCY_HISTOGRAM_GAUGE
3316
+ }
3317
+ ],
3318
+ logFieldList: [
3319
+ {
3320
+ fieldName: "log",
3321
+ gauge: Gauge.LOGGER,
3322
+ instrumentProperty: "val",
3323
+ dataType: "string",
3324
+ timeSeriesIndex: false,
3325
+ quantile: false,
3326
+ influxdbDataType: "stringField",
3327
+ gaugeType: GaugeTypes.INSTRUMENT_LOG,
3328
+ instrumentOptions: {
3329
+ consoleLogging,
3330
+ instrumentLogging
3331
+ }
3332
+ }
3333
+ ],
3334
+ services: {
3335
+ ["service"]: {
3336
+ influxDBContextTags: [
3337
+ "serviceId",
3338
+ "serviceName",
3339
+ "serviceVersion",
3340
+ "serviceInstanceId",
3341
+ "serviceInstanceProcessId",
3342
+ "hostName",
3343
+ "pid",
3344
+ "ppid"
3345
+ ],
3346
+ redisIndexPrefixDefinitions: {
3347
+ timeSeriesIndex: "idx:serviceIndexTimeSeries",
3348
+ timeSeriesPrefix: "/serviceTimeSeries:",
3349
+ instantIndex: "idx:serviceIndexInstant",
3350
+ instantPrefix: "/serviceInstant:"
3351
+ },
3352
+ fieldList: [
3353
+ {
3354
+ fieldName: "cpu",
3355
+ gauge: Gauge.CPU_LOAD_GAUGE,
3356
+ instrumentProperty: "val",
3357
+ dataType: "number",
3358
+ timeSeriesIndex: true,
3359
+ quantile: true,
3360
+ influxdbDataType: "floatField",
3361
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3362
+ instrumentOptions: {
3363
+ interval: instrumentationObservationInterval,
3364
+ sampleSize: instrumentationTimeWindow
3365
+ }
3366
+ },
3367
+ {
3368
+ fieldName: "connectionCount",
3369
+ gauge: Gauge.CONNECTION_COUNT_GAUGE,
3370
+ instrumentProperty: "val",
3371
+ dataType: "number",
3372
+ timeSeriesIndex: true,
3373
+ quantile: true,
3374
+ influxdbDataType: "intField",
3375
+ gaugeType: GaugeTypes.INSTRUMENT_GAUGE,
3376
+ instrumentOptions: {
3377
+ interval: instrumentationObservationInterval,
3378
+ sampleSize: instrumentationTimeWindow
3379
+ }
3380
+ },
3381
+ { fieldName: "connectionPoolCount", gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3382
+ { fieldName: "connectionIdleCount", gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3383
+ { fieldName: "connectionWaitingCount", gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3384
+ { fieldName: "systemcpu", gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3385
+ {
3386
+ fieldName: "memory",
3387
+ gauge: Gauge.OBJECT_GAUGE,
3388
+ instrumentProperty: "val",
3389
+ dataType: "JSON",
3390
+ influxdbDataType: "stringField",
3391
+ gaugeType: GaugeTypes.INSTRUMENT_OBJECT,
3392
+ instrumentOptions: {
3393
+ label: "InstrumentObjectMaster"
3394
+ }
3395
+ }
3396
+ ],
3397
+ GetPathFromContext(context) {
3398
+ const { serviceId, serviceInstanceId, serviceInstanceProcessId } = context;
3399
+ return `/${serviceId}/${serviceInstanceId}/${serviceInstanceProcessId}`;
3400
+ },
3401
+ redisQueryFilters: {
3402
+ level1ContextField: "serviceType",
3403
+ level2ContextField: "appid",
3404
+ level3ContextField: "appinstanceid"
3405
+ },
3406
+ subscriptionTopics: [
3407
+ {
3408
+ subscriptionTopic: SubscriptionTopic.AllServicesCombined,
3409
+ route: "/metrics"
3410
+ },
3411
+ {
3412
+ subscriptionTopic: SubscriptionTopic.Services,
3413
+ route: "/metrics/services"
3414
+ },
3415
+ {
3416
+ subscriptionTopic: SubscriptionTopic.ServiceInstances,
3417
+ route: "/metrics/services/:key"
3418
+ },
3419
+ {
3420
+ subscriptionTopic: SubscriptionTopic.ServiceInstance,
3421
+ route: "/metrics/services/:key/:subkey"
3422
+ }
3423
+ ]
3424
+ },
3425
+ ["agent"]: {
3426
+ influxDBContextTags: [
3427
+ "id",
3428
+ "hostName",
3429
+ "agentName",
3430
+ "threadId",
3431
+ "asyncRunnerId"
3432
+ ],
3433
+ redisIndexPrefixDefinitions: {
3434
+ timeSeriesIndex: "idx:agentIndexTimeSeries",
3435
+ timeSeriesPrefix: "/agentTimeSeries:",
3436
+ instantIndex: "idx:agentIndexInstant",
3437
+ instantPrefix: "/agentInstant:"
3438
+ },
3439
+ fieldList: [
3440
+ { fieldName: "childCount", gauge: Gauge.CHILD_COUNT, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE }
3441
+ ],
3442
+ //@@ need type declare in appframework ?? agent does not use appframework ... perhaps stspublisher
3443
+ GetPathFromContext(context) {
3444
+ const { agentName, threadId, asyncRunnerId } = context;
3445
+ return `/${agentName}/${threadId}/${asyncRunnerId}`;
3446
+ },
3447
+ redisQueryFilters: {
3448
+ level1ContextField: "serviceType",
3449
+ level2ContextField: "appid",
3450
+ //@@ this should be named something else
3451
+ level3ContextField: "appinstanceid"
3452
+ //@@ this should be named something else
3453
+ },
3454
+ subscriptionTopics: [
3455
+ {
3456
+ subscriptionTopic: SubscriptionTopic.AllAgentsCombined,
3457
+ route: "/metrics"
3458
+ },
3459
+ {
3460
+ subscriptionTopic: SubscriptionTopic.Agents,
3461
+ route: "/metrics/agents"
3462
+ },
3463
+ {
3464
+ subscriptionTopic: SubscriptionTopic.AgentWorkers,
3465
+ route: "/metrics/agents/:key"
3466
+ },
3467
+ {
3468
+ subscriptionTopic: SubscriptionTopic.AgentWorker,
3469
+ route: "/metrics/agents/:key/:subkey"
3470
+ }
3471
+ ]
3472
+ },
3473
+ ["lambda"]: {
3474
+ influxDBContextTags: [
3475
+ "technology",
3476
+ "subTechnology",
3477
+ "lambdaFunctionName",
3478
+ "lambdaInstance",
3479
+ "hostName",
3480
+ "processId",
3481
+ "parentProcessId",
3482
+ "useCase",
3483
+ "pattern"
3484
+ ],
3485
+ redisIndexPrefixDefinitions: {
3486
+ timeSeriesIndex: "idx:lambdaIndexTimeSeries",
3487
+ timeSeriesPrefix: "/lambdaTimeSeries:",
3488
+ instantIndex: "idx:lambdaIndexInstant",
3489
+ instantPrefix: "/lambdaInstant:"
3490
+ },
3491
+ fieldList: [
3492
+ { fieldName: "cpu", gauge: Gauge.CPU_LOAD_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3493
+ { fieldName: "connectionCount", gauge: Gauge.CONNECTION_COUNT_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3494
+ { fieldName: "connectionPoolCount", gauge: Gauge.CONNECTION_POOL_TOTAL_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3495
+ { fieldName: "connectionIdleCount", gauge: Gauge.CONNECTION_POOL_IDLE_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3496
+ { fieldName: "connectionWaitingCount", gauge: Gauge.CONNECTION_POOL_WAITING_GAUGE, instrumentProperty: "val", dataType: "number", influxdbDataType: "intField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3497
+ { fieldName: "systemcpu", gauge: Gauge.CPU_SYSTEM_LOAD_GAUGE, instrumentProperty: "val", dataType: "number", timeSeriesIndex: true, quantile: true, influxdbDataType: "floatField", gaugeType: GaugeTypes.INSTRUMENT_GAUGE },
3498
+ { fieldName: "memory", gauge: Gauge.OBJECT_GAUGE, instrumentProperty: "val", dataType: "JSON", influxdbDataType: "stringField", gaugeType: GaugeTypes.INSTRUMENT_OBJECT }
3499
+ ],
3500
+ //@@ need type declare in appframework
3501
+ GetPathFromContext(context) {
3502
+ const { technology, subTechnology, lambdaInstance } = context;
3503
+ return `/${technology}/${subTechnology}/${lambdaInstance}`;
3504
+ },
3505
+ redisQueryFilters: {
3506
+ level1ContextField: "serviceType",
3507
+ level2ContextField: "technology",
3508
+ level3ContextField: "subTechnology"
3509
+ },
3510
+ subscriptionTopics: [
3511
+ {
3512
+ subscriptionTopic: SubscriptionTopic.AllLambdasCombined,
3513
+ // uicontrollerlanding
3514
+ route: "/metrics"
3515
+ },
3516
+ {
3517
+ subscriptionTopic: SubscriptionTopic.LambdaTechnologies,
3518
+ // uicontrollerlambda
3519
+ route: "/metrics/lambdas"
3520
+ },
3521
+ {
3522
+ subscriptionTopic: SubscriptionTopic.LambdaSubTechnologies,
3523
+ // uicontrollerlambdasubtechnologies
3524
+ route: "/metrics/lambdas/:key"
3525
+ },
3526
+ {
3527
+ subscriptionTopic: SubscriptionTopic.LambdaSubTechnologiesInstance,
3528
+ // uicontrollerlambdasubtechnologiesinstance
3529
+ route: "/metrics/lambdas/:key/:subkey"
3530
+ }
3531
+ ]
3532
+ }
3533
+ }
3534
+ };
3238
3535
  const _ObservabilityModelUtils = class _ObservabilityModelUtils2 {
3239
3536
  static GetModelNode(data) {
3240
3537
  const fixedSize = 2;
@@ -3333,6 +3630,23 @@ var __privateMethod = (obj, member, method) => {
3333
3630
  };
3334
3631
  }
3335
3632
  }
3633
+ static GetModelData(serviceType, model, data, parseLog) {
3634
+ const fieldList = [
3635
+ ...globalServiceDefinitions.coreFieldList,
3636
+ ...globalServiceDefinitions.services[serviceType].fieldList
3637
+ ];
3638
+ fieldList.forEach((field) => {
3639
+ if (field.quantile) {
3640
+ _ObservabilityModelUtils2.ParseModelNodeWithQuantile(model, data, parseLog, field.gauge, field.fieldName, `${field.fieldName}_quantile`);
3641
+ } else if (field.histo) {
3642
+ _ObservabilityModelUtils2.ParseModelNodeHisto(model, data, parseLog, field.histoGauge, `${field.fieldName}_histo`);
3643
+ } else if (field.gaugeType.localeCompare(GaugeTypes.INSTRUMENT_OBJECT) === 0) {
3644
+ _ObservabilityModelUtils2.ParseModelNodeObject(model, data, parseLog, field.gauge, field.fieldName);
3645
+ } else {
3646
+ _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, field.gauge, field.fieldName);
3647
+ }
3648
+ });
3649
+ }
3336
3650
  static GetModelForService(id, data, subscribeToKafka, logger) {
3337
3651
  try {
3338
3652
  const parseLog = [];
@@ -3340,29 +3654,7 @@ var __privateMethod = (obj, member, method) => {
3340
3654
  id,
3341
3655
  instruments: {}
3342
3656
  };
3343
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.REQUEST_COUNT_GAUGE, "requestCount");
3344
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.ERROR_COUNT_GAUGE, "errorCount");
3345
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.RETRY_COUNT_GAUGE, "retryCount");
3346
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.AUTHENTICATION_COUNT_GAUGE, "authenticationCount");
3347
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE, "authenticationErrorCount");
3348
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE, "authenticationRetryCount");
3349
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.VELOCITY_GAUGE, "velocity");
3350
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.ACTIVE_REQUEST_GAUGE, "activeRequestCount");
3351
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.CONNECTION_COUNT_GAUGE, "connectionCount");
3352
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.CONNECTION_POOL_TOTAL_GAUGE, "connectionPoolCount");
3353
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.CONNECTION_POOL_IDLE_GAUGE, "connectionIdleCount");
3354
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.CONNECTION_POOL_WAITING_GAUGE, "connectionWaitingCount");
3355
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.CORE_COUNT_GAUGE, "coreCount");
3356
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.TIMER_GAUGE, "timer");
3357
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.NETWORK_RX_GAUGE, "rx");
3358
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.NETWORK_TX_GAUGE, "tx");
3359
- _ObservabilityModelUtils2.ParseModelNodeWithQuantile(model, data, parseLog, Gauge.CPU_LOAD_GAUGE, "cpu", "cpu_quantile");
3360
- _ObservabilityModelUtils2.ParseModelNodeWithQuantile(model, data, parseLog, Gauge.CPU_SYSTEM_LOAD_GAUGE, "systemcpu", "systemcpu_quantile");
3361
- _ObservabilityModelUtils2.ParseModelNodeWithQuantile(model, data, parseLog, Gauge.DURATION_GAUGE, "duration", "duration_quantile");
3362
- _ObservabilityModelUtils2.ParseModelNodeWithQuantile(model, data, parseLog, Gauge.LATENCY_GAUGE, "latency", "latency_quantile");
3363
- _ObservabilityModelUtils2.ParseModelNodeHisto(model, data, parseLog, Gauge.DURATION_HISTOGRAM_GAUGE, "duration_histo");
3364
- _ObservabilityModelUtils2.ParseModelNodeHisto(model, data, parseLog, Gauge.LATENCY_HISTOGRAM_GAUGE, "latency_histo");
3365
- _ObservabilityModelUtils2.ParseModelNodeObject(model, data, parseLog, Gauge.OBJECT_GAUGE, "memory");
3657
+ this.GetModelData("service", model, data, parseLog);
3366
3658
  if (!subscribeToKafka) {
3367
3659
  model.instruments[Gauge.LOGGER] = _ObservabilityModelUtils2.GetModelNodeRawStringArray(data["logMessages"]);
3368
3660
  }
@@ -3381,29 +3673,7 @@ var __privateMethod = (obj, member, method) => {
3381
3673
  id,
3382
3674
  instruments: {}
3383
3675
  };
3384
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.REQUEST_COUNT_GAUGE, "requestCount");
3385
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.ERROR_COUNT_GAUGE, "errorCount");
3386
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.RETRY_COUNT_GAUGE, "retryCount");
3387
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.AUTHENTICATION_COUNT_GAUGE, "authenticationCount");
3388
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE, "authenticationErrorCount");
3389
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE, "authenticationRetryCount");
3390
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.VELOCITY_GAUGE, "velocity");
3391
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.ACTIVE_REQUEST_GAUGE, "activeRequestCount");
3392
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.CONNECTION_COUNT_GAUGE, "connectionCount");
3393
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.CONNECTION_POOL_TOTAL_GAUGE, "connectionPoolCount");
3394
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.CONNECTION_POOL_IDLE_GAUGE, "connectionIdleCount");
3395
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.CONNECTION_POOL_WAITING_GAUGE, "connectionWaitingCount");
3396
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.CORE_COUNT_GAUGE, "coreCount");
3397
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.TIMER_GAUGE, "timer");
3398
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.NETWORK_RX_GAUGE, "rx");
3399
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.NETWORK_TX_GAUGE, "tx");
3400
- _ObservabilityModelUtils2.ParseModelNodeWithQuantile(model, data, parseLog, Gauge.CPU_LOAD_GAUGE, "cpu", "cpu_quantile");
3401
- _ObservabilityModelUtils2.ParseModelNodeWithQuantile(model, data, parseLog, Gauge.CPU_SYSTEM_LOAD_GAUGE, "systemcpu", "systemcpu_quantile");
3402
- _ObservabilityModelUtils2.ParseModelNodeWithQuantile(model, data, parseLog, Gauge.DURATION_GAUGE, "duration", "duration_quantile");
3403
- _ObservabilityModelUtils2.ParseModelNodeWithQuantile(model, data, parseLog, Gauge.LATENCY_GAUGE, "latency", "latency_quantile");
3404
- _ObservabilityModelUtils2.ParseModelNodeHisto(model, data, parseLog, Gauge.DURATION_HISTOGRAM_GAUGE, "duration_histo");
3405
- _ObservabilityModelUtils2.ParseModelNodeHisto(model, data, parseLog, Gauge.LATENCY_HISTOGRAM_GAUGE, "latency_histo");
3406
- _ObservabilityModelUtils2.ParseModelNodeObject(model, data, parseLog, Gauge.OBJECT_GAUGE, "memory");
3676
+ this.GetModelData("lambda", model, data, parseLog);
3407
3677
  if (!subscribeToKafka) {
3408
3678
  model.instruments[Gauge.LOGGER] = _ObservabilityModelUtils2.GetModelNodeRawStringArray(data["logMessages"]);
3409
3679
  }
@@ -3425,22 +3695,7 @@ var __privateMethod = (obj, member, method) => {
3425
3695
  id,
3426
3696
  instruments: {}
3427
3697
  };
3428
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.REQUEST_COUNT_GAUGE, "requestCount");
3429
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.ERROR_COUNT_GAUGE, "errorCount");
3430
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.RETRY_COUNT_GAUGE, "retryCount");
3431
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.AUTHENTICATION_COUNT_GAUGE, "authenticationCount");
3432
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE, "authenticationErrorCount");
3433
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE, "authenticationRetryCount");
3434
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.VELOCITY_GAUGE, "velocity");
3435
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.CORE_COUNT_GAUGE, "coreCount");
3436
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.TIMER_GAUGE, "timer");
3437
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.ACTIVE_REQUEST_GAUGE, "activeRequestCount");
3438
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.NETWORK_RX_GAUGE, "rx");
3439
- _ObservabilityModelUtils2.ParseModelNode(model, data, parseLog, Gauge.NETWORK_TX_GAUGE, "tx");
3440
- _ObservabilityModelUtils2.ParseModelNodeWithQuantile(model, data, parseLog, Gauge.DURATION_GAUGE, "duration", "duration_quantile");
3441
- _ObservabilityModelUtils2.ParseModelNodeWithQuantile(model, data, parseLog, Gauge.LATENCY_GAUGE, "latency", "latency_quantile");
3442
- _ObservabilityModelUtils2.ParseModelNodeHisto(model, data, parseLog, Gauge.DURATION_HISTOGRAM_GAUGE, "duration_histo");
3443
- _ObservabilityModelUtils2.ParseModelNodeHisto(model, data, parseLog, Gauge.LATENCY_HISTOGRAM_GAUGE, "latency_histo");
3698
+ this.GetModelData("agent", model, data, parseLog);
3444
3699
  if (!subscribeToKafka) {
3445
3700
  model.instruments[Gauge.LOGGER] = _ObservabilityModelUtils2.GetModelNodeRawStringArray(data["logMessages"]);
3446
3701
  }
@@ -3489,431 +3744,11 @@ var __privateMethod = (obj, member, method) => {
3489
3744
  model.instruments[gaugeName] = _ObservabilityModelUtils.GetModelNodeObject({});
3490
3745
  }
3491
3746
  });
3492
- debugModule(`proc:${process.pid}`);
3493
3747
  const byteToHex = [];
3494
3748
  for (let i = 0; i < 256; ++i) {
3495
3749
  byteToHex.push((i + 256).toString(16).slice(1));
3496
3750
  }
3497
3751
  typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
3498
- ({
3499
- 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
- },
3556
- {
3557
- fieldName: "activeRequestCount",
3558
- gauge: Gauge.ACTIVE_REQUEST_GAUGE,
3559
- instrumentProperty: "val",
3560
- dataType: "number",
3561
- timeSeriesIndex: true,
3562
- 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 */
3597
- },
3598
- {
3599
- fieldName: "duration",
3600
- gauge: Gauge.DURATION_GAUGE,
3601
- instrumentProperty: "val",
3602
- dataType: "number",
3603
- timeSeriesIndex: true,
3604
- quantile: true,
3605
- influxdbDataType: "floatField",
3606
- histo: [
3607
- { label: "B10", bucketLimit: 10 },
3608
- { label: "B20", bucketLimit: 20 },
3609
- { label: "B50", bucketLimit: 50 },
3610
- { label: "B100", bucketLimit: 100 },
3611
- { label: "B1000", bucketLimit: 1e3 },
3612
- { label: "B50000", bucketLimit: 5e4 },
3613
- { label: "BInfinity", bucketLimit: -1 }
3614
- ]
3615
- },
3616
- {
3617
- fieldName: "latency",
3618
- gauge: Gauge.LATENCY_GAUGE,
3619
- instrumentProperty: "val",
3620
- dataType: "number",
3621
- timeSeriesIndex: true,
3622
- quantile: true,
3623
- influxdbDataType: "floatField",
3624
- histo: [
3625
- { label: "B10", bucketLimit: 10 },
3626
- { label: "B20", bucketLimit: 20 },
3627
- { label: "B50", bucketLimit: 50 },
3628
- { label: "B100", bucketLimit: 100 },
3629
- { label: "B1000", bucketLimit: 1e3 },
3630
- { label: "B50000", bucketLimit: 5e4 },
3631
- { label: "BInfinity", bucketLimit: -1 }
3632
- ]
3633
- }
3634
- ],
3635
- services: {
3636
- ["service"]: {
3637
- influxDBContextTags: [
3638
- "serviceId",
3639
- "serviceName",
3640
- "serviceVersion",
3641
- "serviceInstanceId",
3642
- "serviceInstanceProcessId",
3643
- "hostName",
3644
- "pid",
3645
- "ppid"
3646
- ],
3647
- redisIndexPrefixDefinitions: {
3648
- timeSeriesIndex: "idx:serviceIndexTimeSeries",
3649
- timeSeriesPrefix: "/serviceTimeSeries:",
3650
- instantIndex: "idx:serviceIndexInstant",
3651
- instantPrefix: "/serviceInstant:"
3652
- },
3653
- fieldList: [
3654
- {
3655
- fieldName: "cpu",
3656
- gauge: Gauge.CPU_LOAD_GAUGE,
3657
- instrumentProperty: "val",
3658
- dataType: "number",
3659
- timeSeriesIndex: true,
3660
- quantile: true,
3661
- influxdbDataType: "floatField"
3662
- /* floatField */
3663
- },
3664
- {
3665
- fieldName: "connectionCount",
3666
- gauge: Gauge.CONNECTION_COUNT_GAUGE,
3667
- instrumentProperty: "val",
3668
- dataType: "number",
3669
- timeSeriesIndex: true,
3670
- 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 */
3707
- },
3708
- {
3709
- fieldName: "memory",
3710
- gauge: Gauge.OBJECT_GAUGE,
3711
- instrumentProperty: "val",
3712
- dataType: "JSON",
3713
- influxdbDataType: "stringField"
3714
- /* stringField */
3715
- }
3716
- ],
3717
- GetPathFromContext(context) {
3718
- const { serviceId, serviceInstanceId, serviceInstanceProcessId } = context;
3719
- return `/${serviceId}/${serviceInstanceId}/${serviceInstanceProcessId}`;
3720
- },
3721
- redisQueryFilters: {
3722
- level1ContextField: "serviceType",
3723
- level2ContextField: "appid",
3724
- level3ContextField: "appinstanceid"
3725
- },
3726
- subscriptionTopics: [
3727
- {
3728
- subscriptionTopic: SubscriptionTopic.AllServicesCombined,
3729
- route: "/metrics"
3730
- },
3731
- {
3732
- subscriptionTopic: SubscriptionTopic.Services,
3733
- route: "/metrics/services"
3734
- },
3735
- {
3736
- subscriptionTopic: SubscriptionTopic.ServiceInstances,
3737
- route: "/metrics/services/:key"
3738
- },
3739
- {
3740
- subscriptionTopic: SubscriptionTopic.ServiceInstance,
3741
- route: "/metrics/services/:key/:subkey"
3742
- }
3743
- ]
3744
- },
3745
- ["agent"]: {
3746
- influxDBContextTags: [
3747
- "id",
3748
- "hostName",
3749
- "agentName",
3750
- "threadId",
3751
- "asyncRunnerId"
3752
- ],
3753
- redisIndexPrefixDefinitions: {
3754
- timeSeriesIndex: "idx:agentIndexTimeSeries",
3755
- timeSeriesPrefix: "/agentTimeSeries:",
3756
- instantIndex: "idx:agentIndexInstant",
3757
- instantPrefix: "/agentInstant:"
3758
- },
3759
- fieldList: [
3760
- {
3761
- fieldName: "childCount",
3762
- gauge: Gauge.CHILD_COUNT,
3763
- instrumentProperty: "val",
3764
- dataType: "number",
3765
- influxdbDataType: "intField"
3766
- /* intField */
3767
- }
3768
- ],
3769
- //@@ need type declare in appframework ?? agent does not use appframework ... perhaps stspublisher
3770
- GetPathFromContext(context) {
3771
- const { agentName, threadId, asyncRunnerId } = context;
3772
- return `/${agentName}/${threadId}/${asyncRunnerId}`;
3773
- },
3774
- redisQueryFilters: {
3775
- level1ContextField: "serviceType",
3776
- level2ContextField: "appid",
3777
- //@@ this should be named something else
3778
- level3ContextField: "appinstanceid"
3779
- //@@ this should be named something else
3780
- },
3781
- subscriptionTopics: [
3782
- {
3783
- subscriptionTopic: SubscriptionTopic.AllAgentsCombined,
3784
- route: "/metrics"
3785
- },
3786
- {
3787
- subscriptionTopic: SubscriptionTopic.Agents,
3788
- route: "/metrics/agents"
3789
- },
3790
- {
3791
- subscriptionTopic: SubscriptionTopic.AgentWorkers,
3792
- route: "/metrics/agents/:key"
3793
- },
3794
- {
3795
- subscriptionTopic: SubscriptionTopic.AgentWorker,
3796
- route: "/metrics/agents/:key/:subkey"
3797
- }
3798
- ]
3799
- },
3800
- ["lambda"]: {
3801
- influxDBContextTags: [
3802
- "technology",
3803
- "subTechnology",
3804
- "lambdaFunctionName",
3805
- "lambdaInstance",
3806
- "hostName",
3807
- "processId",
3808
- "parentProcessId",
3809
- "useCase",
3810
- "pattern"
3811
- ],
3812
- redisIndexPrefixDefinitions: {
3813
- timeSeriesIndex: "idx:lambdaIndexTimeSeries",
3814
- timeSeriesPrefix: "/lambdaTimeSeries:",
3815
- instantIndex: "idx:lambdaIndexInstant",
3816
- instantPrefix: "/lambdaInstant:"
3817
- },
3818
- 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
- }
3881
- ],
3882
- //@@ need type declare in appframework
3883
- GetPathFromContext(context) {
3884
- const { technology, subTechnology, lambdaInstance } = context;
3885
- return `/${technology}/${subTechnology}/${lambdaInstance}`;
3886
- },
3887
- redisQueryFilters: {
3888
- level1ContextField: "serviceType",
3889
- level2ContextField: "technology",
3890
- level3ContextField: "subTechnology"
3891
- },
3892
- subscriptionTopics: [
3893
- {
3894
- subscriptionTopic: SubscriptionTopic.AllLambdasCombined,
3895
- // uicontrollerlanding
3896
- route: "/metrics"
3897
- },
3898
- {
3899
- subscriptionTopic: SubscriptionTopic.LambdaTechnologies,
3900
- // uicontrollerlambda
3901
- route: "/metrics/lambdas"
3902
- },
3903
- {
3904
- subscriptionTopic: SubscriptionTopic.LambdaSubTechnologies,
3905
- // uicontrollerlambdasubtechnologies
3906
- route: "/metrics/lambdas/:key"
3907
- },
3908
- {
3909
- subscriptionTopic: SubscriptionTopic.LambdaSubTechnologiesInstance,
3910
- // uicontrollerlambdasubtechnologiesinstance
3911
- route: "/metrics/lambdas/:key/:subkey"
3912
- }
3913
- ]
3914
- }
3915
- }
3916
- });
3917
3752
  const TelemetryStore = pinia.defineStore("__sts__TelemetryStore", {
3918
3753
  // State
3919
3754
  // https://pinia.vuejs.org/core-concepts/state.html