@adalo/metrics 0.1.114 → 0.1.115

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,4 +1,4 @@
1
- const { MetricsClient } = require('.')
1
+ const { BaseMetricsClient } = require('./baseMetricsClient')
2
2
  const {
3
3
  getRedisClientType,
4
4
  REDIS_V4,
@@ -10,26 +10,25 @@ const redisConnectionStableFields = ['name', 'flags', 'cmd']
10
10
  const redisConnectionFields = ['name', 'flags', 'tot-mem', 'cmd']
11
11
 
12
12
  /**
13
- * RedisMetricsClient extends MetricsClient to collect
13
+ * RedisMetricsClient extends BaseMetricsClient to collect
14
14
  * Redis metrics periodically and push them to Prometheus Pushgateway.
15
15
  *
16
- * @extends MetricsClient
16
+ * @extends BaseMetricsClient
17
17
  */
18
- class RedisMetricsClient extends MetricsClient {
18
+ class RedisMetricsClient extends BaseMetricsClient {
19
19
  /**
20
20
  * @param {Object} options
21
21
  * @param {any} options.redisClient - Redis client instance (required)
22
- * @param {string} [options.appName] - Application name (from MetricsClient)
23
- * @param {string} [options.dynoId] - Dyno/instance ID (from MetricsClient)
24
- * @param {string} [options.processType] - Process type (from MetricsClient)
25
- * @param {boolean} [options.enabled] - Enable metrics collection (from MetricsClient)
26
- * @param {boolean} [options.logValues] - Log metrics values (from MetricsClient)
27
- * @param {string} [options.pushgatewayUrl] - PushGateway URL (from MetricsClient)
28
- * @param {string} [options.pushgatewaySecret] - PushGateway secret token (from MetricsClient)
29
- * @param {number} [options.intervalSec] - Interval in seconds for pushing metrics (from MetricsClient)
30
- * @param {boolean} [options.removeOldMetrics] - Remove old metrics by service (from MetricsClient)
31
- * @param {boolean} [options.scripDefaultMetrics] - Skip default metrics creation (from MetricsClient)
32
- * @param {function} [options.startupValidation] - Function to validate startup (from MetricsClient)
22
+ * @param {string} [options.appName] - Application name (from BaseMetricsClient)
23
+ * @param {string} [options.dynoId] - Dyno/instance ID (from BaseMetricsClient)
24
+ * @param {string} [options.processType] - Process type (from BaseMetricsClient)
25
+ * @param {boolean} [options.enabled] - Enable metrics collection (from BaseMetricsClient)
26
+ * @param {boolean} [options.logValues] - Log metrics values (from BaseMetricsClient)
27
+ * @param {string} [options.pushgatewayUrl] - PushGateway URL (from BaseMetricsClient)
28
+ * @param {string} [options.pushgatewaySecret] - PushGateway secret token (from BaseMetricsClient)
29
+ * @param {number} [options.intervalSec] - Interval in seconds for pushing metrics (from BaseMetricsClient)
30
+ * @param {boolean} [options.removeOldMetrics] - Remove old metrics by service (from BaseMetricsClient)
31
+ * @param {function} [options.startupValidation] - Function to validate startup (from BaseMetricsClient)
33
32
  */
34
33
  constructor({ redisClient, ...metricsConfig } = {}) {
35
34
  const intervalSec =
@@ -39,7 +38,6 @@ class RedisMetricsClient extends MetricsClient {
39
38
 
40
39
  super({
41
40
  ...metricsConfig,
42
- scripDefaultMetrics: true,
43
41
  processType: metricsConfig.processType || 'queue-metrics',
44
42
  intervalSec,
45
43
  })