@podium/client 5.2.7 → 5.3.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [5.3.0](https://github.com/podium-lib/client/compare/v5.2.7...v5.3.0) (2025-02-07)
2
+
3
+
4
+ ### Features
5
+
6
+ * add metric to track register podlets ([673a4e7](https://github.com/podium-lib/client/commit/673a4e7554282570d1a074ae7206873af7183dbe))
7
+
1
8
  ## [5.2.7](https://github.com/podium-lib/client/compare/v5.2.6...v5.2.7) (2025-02-06)
2
9
 
3
10
 
package/lib/client.js CHANGED
@@ -68,6 +68,7 @@ export default class PodiumClient extends EventEmitter {
68
68
  #resources;
69
69
  #registry;
70
70
  #metrics;
71
+ #counter;
71
72
  #histogram;
72
73
  #options;
73
74
  #state;
@@ -144,6 +145,16 @@ export default class PodiumClient extends EventEmitter {
144
145
  },
145
146
  });
146
147
 
148
+ this.#counter = this.#metrics.counter({
149
+ name: 'podium_client_registered_podlet_count',
150
+ description: 'Number of podlets registered with the client',
151
+ labels: {
152
+ clientName: this.#options.name,
153
+ resourceName: undefined,
154
+ resourceUri: undefined,
155
+ },
156
+ });
157
+
147
158
  this.#histogram = this.#metrics.histogram({
148
159
  name: 'podium_client_refresh_manifests',
149
160
  description: 'Time taken for podium client to refresh manifests',
@@ -221,6 +232,13 @@ export default class PodiumClient extends EventEmitter {
221
232
  resourceOptions,
222
233
  );
223
234
 
235
+ this.#counter.inc({
236
+ labels: {
237
+ resourceName: options.name,
238
+ resourceUri: options.uri,
239
+ },
240
+ });
241
+
224
242
  resource.metrics.pipe(this.#metrics);
225
243
 
226
244
  Object.defineProperty(this, options.name, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podium/client",
3
- "version": "5.2.7",
3
+ "version": "5.3.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "keywords": [