@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.
- package/index.js +6 -1
- 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
|
|
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
|
}
|