@platformatic/metrics 3.2.1 → 3.4.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.
Files changed (2) hide show
  1. package/index.js +6 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -144,7 +144,12 @@ export async function collectMetrics (applicationId, workerId, metricsConfig = {
144
144
  registry = new Registry()
145
145
  }
146
146
 
147
- const labels = { ...metricsConfig.labels, applicationId }
147
+ const labels = { ...metricsConfig.labels }
148
+
149
+ // Use the configured label name
150
+ const labelName = metricsConfig.idLabel || 'applicationId'
151
+ labels[labelName] = applicationId
152
+
148
153
  if (workerId >= 0) {
149
154
  labels.workerId = workerId
150
155
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/metrics",
3
- "version": "3.2.1",
3
+ "version": "3.4.0",
4
4
  "description": "Platformatic Capability Metrics",
5
5
  "main": "index.js",
6
6
  "type": "module",