@platformatic/runtime 1.52.0 → 1.52.1
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/fixtures/configs/monorepo-with-metrics.json +33 -0
- package/lib/app.js +4 -3
- package/package.json +11 -11
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://platformatic.dev/schemas/v0.20.0/runtime",
|
|
3
|
+
"entrypoint": "serviceApp",
|
|
4
|
+
"allowCycles": true,
|
|
5
|
+
"hotReload": false,
|
|
6
|
+
"managementApi": false,
|
|
7
|
+
"autoload": {
|
|
8
|
+
"path": "../monorepo",
|
|
9
|
+
"exclude": [
|
|
10
|
+
"docs",
|
|
11
|
+
"composerApp"
|
|
12
|
+
],
|
|
13
|
+
"mappings": {
|
|
14
|
+
"serviceAppWithLogger": {
|
|
15
|
+
"id": "with-logger",
|
|
16
|
+
"config": "platformatic.service.json"
|
|
17
|
+
},
|
|
18
|
+
"serviceAppWithMultiplePlugins": {
|
|
19
|
+
"id": "multi-plugin-service",
|
|
20
|
+
"config": "platformatic.service.json"
|
|
21
|
+
},
|
|
22
|
+
"dbApp": {
|
|
23
|
+
"id": "db-app",
|
|
24
|
+
"config": "platformatic.db.json"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"metrics": {
|
|
29
|
+
"labels": {
|
|
30
|
+
"app": "serviceApp"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
package/lib/app.js
CHANGED
|
@@ -275,16 +275,17 @@ class PlatformaticApp extends EventEmitter {
|
|
|
275
275
|
configManager.current.metrics
|
|
276
276
|
) {
|
|
277
277
|
const labels = configManager.current.metrics?.labels || {}
|
|
278
|
+
const serviceId = this.appConfig.id
|
|
278
279
|
configManager.update({
|
|
279
280
|
...configManager.current,
|
|
280
281
|
metrics: {
|
|
281
282
|
server: 'hide',
|
|
282
283
|
defaultMetrics: { enabled: this.appConfig.entrypoint },
|
|
284
|
+
...configManager.current.metrics,
|
|
283
285
|
labels: {
|
|
284
|
-
serviceId
|
|
286
|
+
serviceId,
|
|
285
287
|
...labels
|
|
286
|
-
}
|
|
287
|
-
...configManager.current.metrics
|
|
288
|
+
}
|
|
288
289
|
}
|
|
289
290
|
})
|
|
290
291
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "1.52.
|
|
3
|
+
"version": "1.52.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"typescript": "^5.4.2",
|
|
35
35
|
"undici-oidc-interceptor": "^0.5.0",
|
|
36
36
|
"why-is-node-running": "^2.2.2",
|
|
37
|
-
"@platformatic/sql-graphql": "1.52.
|
|
38
|
-
"@platformatic/sql-mapper": "1.52.
|
|
37
|
+
"@platformatic/sql-graphql": "1.52.1",
|
|
38
|
+
"@platformatic/sql-mapper": "1.52.1"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@fastify/error": "^3.4.1",
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
"undici": "^6.9.0",
|
|
64
64
|
"why-is-node-running": "^2.2.2",
|
|
65
65
|
"ws": "^8.16.0",
|
|
66
|
-
"@platformatic/bus": "1.52.
|
|
67
|
-
"@platformatic/config": "1.52.
|
|
68
|
-
"@platformatic/
|
|
69
|
-
"@platformatic/generators": "1.52.
|
|
70
|
-
"@platformatic/
|
|
71
|
-
"@platformatic/
|
|
72
|
-
"@platformatic/
|
|
73
|
-
"@platformatic/utils": "1.52.
|
|
66
|
+
"@platformatic/bus": "1.52.1",
|
|
67
|
+
"@platformatic/config": "1.52.1",
|
|
68
|
+
"@platformatic/composer": "1.52.1",
|
|
69
|
+
"@platformatic/generators": "1.52.1",
|
|
70
|
+
"@platformatic/service": "1.52.1",
|
|
71
|
+
"@platformatic/telemetry": "1.52.1",
|
|
72
|
+
"@platformatic/db": "1.52.1",
|
|
73
|
+
"@platformatic/utils": "1.52.1"
|
|
74
74
|
},
|
|
75
75
|
"standard": {
|
|
76
76
|
"ignore": [
|