@checkstack/healthcheck-ping-backend 0.2.8 → 0.2.10

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,5 +1,34 @@
1
1
  # @checkstack/healthcheck-ping-backend
2
2
 
3
+ ## 0.2.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 8d1ef12: ## Downstream consumer bumps for the anomaly detection + cache system rollout
8
+
9
+ Packages on this branch were updated as part of the anomaly detection feature (schema annotations on result fields, plugin metadata for the modular cache system) but were not listed in the upstream changesets.
10
+
11
+ - **`@checkstack/healthcheck-common`** (minor) — new RPC contract additions and schema changes supporting per-field anomaly metadata.
12
+ - **`@checkstack/cache-memory-common`** (minor) — new package providing access rules + plugin metadata for the in-memory cache backend.
13
+ - **healthcheck plugins** (patch) — adopt the new `x-anomaly-*` schema annotations on their result fields so anomaly detection works automatically against their checks. No public API changes.
14
+ - **integration / notification / auth / queue / collector plugins** (patch) — minor internal updates as consumers of upstream API changes (cache plugin registry, schema additions). No public API changes.
15
+
16
+ - Updated dependencies [8d1ef12]
17
+ - Updated dependencies [8d1ef12]
18
+ - Updated dependencies [8d1ef12]
19
+ - @checkstack/healthcheck-common@0.12.0
20
+ - @checkstack/common@0.7.0
21
+ - @checkstack/backend-api@0.13.0
22
+
23
+ ## 0.2.9
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [26d8bae]
28
+ - Updated dependencies [26d8bae]
29
+ - @checkstack/healthcheck-common@0.11.0
30
+ - @checkstack/backend-api@0.12.0
31
+
3
32
  ## 0.2.8
4
33
 
5
34
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/healthcheck-ping-backend",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -12,9 +12,9 @@
12
12
  "lint:code": "eslint . --max-warnings 0"
13
13
  },
14
14
  "dependencies": {
15
- "@checkstack/backend-api": "0.11.0",
16
- "@checkstack/common": "0.6.4",
17
- "@checkstack/healthcheck-common": "0.10.0"
15
+ "@checkstack/backend-api": "0.12.0",
16
+ "@checkstack/common": "0.6.5",
17
+ "@checkstack/healthcheck-common": "0.11.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/bun": "^1.0.0",
@@ -12,7 +12,7 @@ describe("PingCollector", () => {
12
12
  avgLatency?: number;
13
13
  maxLatency?: number;
14
14
  error?: string;
15
- } = {}
15
+ } = {},
16
16
  ): PingTransportClient => ({
17
17
  exec: mock(() =>
18
18
  Promise.resolve({
@@ -23,7 +23,7 @@ describe("PingCollector", () => {
23
23
  avgLatency: response.avgLatency ?? 15,
24
24
  maxLatency: response.maxLatency ?? 20,
25
25
  error: response.error,
26
- })
26
+ }),
27
27
  ),
28
28
  });
29
29
 
@@ -46,30 +46,42 @@ const pingResultSchema = healthResultSchema({
46
46
  packetsSent: healthResultNumber({
47
47
  "x-chart-type": "counter",
48
48
  "x-chart-label": "Packets Sent",
49
+ "x-anomaly-enabled": true,
50
+ "x-anomaly-direction": "deviation",
49
51
  }),
50
52
  packetsReceived: healthResultNumber({
51
53
  "x-chart-type": "counter",
52
54
  "x-chart-label": "Packets Received",
55
+ "x-anomaly-enabled": true,
56
+ "x-anomaly-direction": "higher-is-better",
53
57
  }),
54
58
  packetLoss: healthResultNumber({
55
59
  "x-chart-type": "gauge",
56
60
  "x-chart-label": "Packet Loss",
57
61
  "x-chart-unit": "%",
62
+ "x-anomaly-enabled": true,
63
+ "x-anomaly-direction": "lower-is-better",
58
64
  }),
59
65
  minLatency: healthResultNumber({
60
66
  "x-chart-type": "line",
61
67
  "x-chart-label": "Min Latency",
62
68
  "x-chart-unit": "ms",
69
+ "x-anomaly-enabled": true,
70
+ "x-anomaly-direction": "lower-is-better",
63
71
  }).optional(),
64
72
  avgLatency: healthResultNumber({
65
73
  "x-chart-type": "line",
66
74
  "x-chart-label": "Avg Latency",
67
75
  "x-chart-unit": "ms",
76
+ "x-anomaly-enabled": true,
77
+ "x-anomaly-direction": "lower-is-better",
68
78
  }).optional(),
69
79
  maxLatency: healthResultNumber({
70
80
  "x-chart-type": "line",
71
81
  "x-chart-label": "Max Latency",
72
82
  "x-chart-unit": "ms",
83
+ "x-anomaly-enabled": true,
84
+ "x-anomaly-direction": "lower-is-better",
73
85
  }).optional(),
74
86
  });
75
87
 
@@ -81,11 +93,15 @@ const pingAggregatedFields = {
81
93
  "x-chart-type": "gauge",
82
94
  "x-chart-label": "Avg Packet Loss",
83
95
  "x-chart-unit": "%",
96
+ "x-anomaly-enabled": true,
97
+ "x-anomaly-direction": "lower-is-better",
84
98
  }),
85
99
  avgLatency: aggregatedAverage({
86
100
  "x-chart-type": "line",
87
101
  "x-chart-label": "Avg Latency",
88
102
  "x-chart-unit": "ms",
103
+ "x-anomaly-enabled": true,
104
+ "x-anomaly-direction": "lower-is-better",
89
105
  }),
90
106
  };
91
107
 
package/src/strategy.ts CHANGED
@@ -53,34 +53,47 @@ const pingResultSchema = healthResultSchema({
53
53
  packetsSent: healthResultNumber({
54
54
  "x-chart-type": "counter",
55
55
  "x-chart-label": "Packets Sent",
56
+ "x-anomaly-enabled": true,
57
+ "x-anomaly-direction": "deviation",
56
58
  }),
57
59
  packetsReceived: healthResultNumber({
58
60
  "x-chart-type": "counter",
59
61
  "x-chart-label": "Packets Received",
62
+ "x-anomaly-enabled": true,
63
+ "x-anomaly-direction": "higher-is-better",
60
64
  }),
61
65
  packetLoss: healthResultNumber({
62
66
  "x-chart-type": "gauge",
63
67
  "x-chart-label": "Packet Loss",
64
68
  "x-chart-unit": "%",
69
+ "x-anomaly-enabled": true,
70
+ "x-anomaly-direction": "lower-is-better",
65
71
  }),
66
72
  minLatency: healthResultNumber({
67
73
  "x-chart-type": "line",
68
74
  "x-chart-label": "Min Latency",
69
75
  "x-chart-unit": "ms",
76
+ "x-anomaly-enabled": true,
77
+ "x-anomaly-direction": "lower-is-better",
70
78
  }).optional(),
71
79
  avgLatency: healthResultNumber({
72
80
  "x-chart-type": "line",
73
81
  "x-chart-label": "Avg Latency",
74
82
  "x-chart-unit": "ms",
83
+ "x-anomaly-enabled": true,
84
+ "x-anomaly-direction": "lower-is-better",
75
85
  }).optional(),
76
86
  maxLatency: healthResultNumber({
77
87
  "x-chart-type": "line",
78
88
  "x-chart-label": "Max Latency",
79
89
  "x-chart-unit": "ms",
90
+ "x-anomaly-enabled": true,
91
+ "x-anomaly-direction": "lower-is-better",
80
92
  }).optional(),
81
93
  error: healthResultString({
82
94
  "x-chart-type": "status",
83
95
  "x-chart-label": "Error",
96
+ "x-anomaly-enabled": false,
84
97
  }).optional(),
85
98
  });
86
99
 
@@ -92,20 +105,28 @@ const pingAggregatedFields = {
92
105
  "x-chart-type": "gauge",
93
106
  "x-chart-label": "Avg Packet Loss",
94
107
  "x-chart-unit": "%",
108
+ "x-anomaly-enabled": true,
109
+ "x-anomaly-direction": "lower-is-better",
95
110
  }),
96
111
  avgLatency: aggregatedAverage({
97
112
  "x-chart-type": "line",
98
113
  "x-chart-label": "Avg Latency",
99
114
  "x-chart-unit": "ms",
115
+ "x-anomaly-enabled": true,
116
+ "x-anomaly-direction": "lower-is-better",
100
117
  }),
101
118
  maxLatency: aggregatedMinMax({
102
119
  "x-chart-type": "line",
103
120
  "x-chart-label": "Max Latency",
104
121
  "x-chart-unit": "ms",
122
+ "x-anomaly-enabled": true,
123
+ "x-anomaly-direction": "lower-is-better",
105
124
  }),
106
125
  errorCount: aggregatedCounter({
107
126
  "x-chart-type": "counter",
108
127
  "x-chart-label": "Errors",
128
+ "x-anomaly-enabled": true,
129
+ "x-anomaly-direction": "lower-is-better",
109
130
  }),
110
131
  };
111
132