@platformatic/basic 2.74.2 → 2.75.0-alpha.0

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.
package/lib/base.js CHANGED
@@ -506,6 +506,13 @@ export class BaseStackable extends EventEmitter {
506
506
  globalThis.platformatic.onHttpStatsSize = (url, val) => {
507
507
  httpStatsSizeMetric.set({ dispatcher_stats_url: url }, val)
508
508
  }
509
+
510
+ const activeResourcesEventLoopMetric = new client.Gauge({
511
+ name: 'active_resources_event_loop',
512
+ help: 'Number of active resources keeping the event loop alive',
513
+ registers: [registry]
514
+ })
515
+ globalThis.platformatic.onActiveResourcesEventLoop = (val) => activeResourcesEventLoopMetric.set(val)
509
516
  }
510
517
 
511
518
  async #invalidateHttpCache (opts = {}) {
@@ -283,6 +283,13 @@ export class ChildProcess extends ITC {
283
283
  globalThis.platformatic.onHttpStatsSize = (url, val) => {
284
284
  httpStatsSizeMetric.set({ dispatcher_stats_url: url }, val)
285
285
  }
286
+
287
+ const activeResourcesEventLoopMetric = new client.Gauge({
288
+ name: 'active_resources_event_loop',
289
+ help: 'Number of active resources keeping the event loop alive',
290
+ registers: [registry]
291
+ })
292
+ globalThis.platformatic.onActiveResourcesEventLoop = (val) => activeResourcesEventLoopMetric.set(val)
286
293
  }
287
294
 
288
295
  async #getMetrics ({ format } = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/basic",
3
- "version": "2.74.2",
3
+ "version": "2.75.0-alpha.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -24,11 +24,11 @@
24
24
  "split2": "^4.2.0",
25
25
  "undici": "^7.0.0",
26
26
  "ws": "^8.18.0",
27
- "@platformatic/config": "2.74.2",
28
- "@platformatic/itc": "2.74.2",
29
- "@platformatic/metrics": "2.74.2",
30
- "@platformatic/utils": "2.74.2",
31
- "@platformatic/telemetry": "2.74.2"
27
+ "@platformatic/metrics": "2.75.0-alpha.0",
28
+ "@platformatic/config": "2.75.0-alpha.0",
29
+ "@platformatic/utils": "2.75.0-alpha.0",
30
+ "@platformatic/telemetry": "2.75.0-alpha.0",
31
+ "@platformatic/itc": "2.75.0-alpha.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "borp": "^0.20.0",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/basic/2.74.2.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/basic/2.75.0-alpha.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Stackable",
5
5
  "type": "object",