@platformatic/watt-extra 1.5.0 → 1.5.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.
@@ -0,0 +1,11 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Read(//work/workspaces/workspace-platformatic/platformatic/**)",
5
+ "Bash(npx borp:*)",
6
+ "Bash(timeout 30 npx borp -c 1 --timeout=20000 ./test/trigger-flamegraphs.test.js)"
7
+ ],
8
+ "deny": [],
9
+ "ask": []
10
+ }
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/watt-extra",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "The Platformatic runtime manager",
5
5
  "type": "module",
6
6
  "scripts": {
package/plugins/alerts.js CHANGED
@@ -11,7 +11,11 @@ async function alerts (app, _opts) {
11
11
 
12
12
  async function setupAlerts () {
13
13
  const scalerAlgorithmVersion = app.instanceConfig?.scaler?.version ?? 'v1'
14
- if (scalerAlgorithmVersion !== 'v1') return
14
+ if (scalerAlgorithmVersion !== 'v1') {
15
+ app.log.info({ scalerVersion: scalerAlgorithmVersion }, 'Skipping v1 alerts setup, scaler version is not v1')
16
+ return
17
+ }
18
+ app.log.info('Setting up v1 scaler alerts')
15
19
 
16
20
  // Skip alerts setup if ICC is not configured
17
21
  if (!app.env.PLT_ICC_URL) {
@@ -36,7 +36,11 @@ async function healthSignals (app, _opts) {
36
36
 
37
37
  async function setupHealthSignals () {
38
38
  const scalerAlgorithmVersion = app.instanceConfig?.scaler?.version ?? 'v1'
39
- if (scalerAlgorithmVersion !== 'v2') return
39
+ if (scalerAlgorithmVersion !== 'v2') {
40
+ app.log.info({ scalerVersion: scalerAlgorithmVersion }, 'Skipping v2 health signals setup, scaler version is not v2')
41
+ return
42
+ }
43
+ app.log.info('Setting up v2 scaler health signals')
40
44
 
41
45
  const runtimeVersion = app.watt.getRuntimeVersion()
42
46
  if (semver.lt(runtimeVersion, '1.4.0')) {
package/plugins/init.js CHANGED
@@ -42,6 +42,8 @@ async function initPlugin (app) {
42
42
 
43
43
  instanceConfig.scaler ??= { version: 'v1' }
44
44
 
45
+ app.log.info({ scalerVersion: instanceConfig.scaler.version }, 'Scaler version configured')
46
+
45
47
  // Use the application name from the ICC response if not provided
46
48
  applicationName = applicationName || instanceConfig.applicationName
47
49
  app.log.info({ applicationName }, 'Application name resolved')