@checkstack/healthcheck-postgres-backend 0.4.0 → 0.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,52 @@
1
1
  # @checkstack/healthcheck-postgres-backend
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c55d7c6: Unify the healthcheck chart system on the `@checkstack/ui` SVG kit and
8
+ redesign the HealthCheck drawer.
9
+
10
+ - `@checkstack/ui` gains six chart primitives (each with a Storybook story):
11
+ `StackedTimeline` (stacked status counts per bucket on the colorblind-safe
12
+ status triad), `ChartTooltip` + `useBandHover` (the one shared chart
13
+ tooltip and its cursor hit-testing), `ChartCard` / `chartCardChromeClass`
14
+ (the premium gradient card chrome, flat on low-power devices), `StatTile`
15
+ (number-led metric tile with delta chip, sparkline/ribbon footer, and
16
+ click-to-expand disclosure), `DistributionBar` (stacked horizontal
17
+ distribution + legend, replaces pies), and `CategoryRibbon` (categorical
18
+ history ribbon). `TimeSeriesChart` gains a hover tooltip with a crosshair
19
+ marker.
20
+ - `@checkstack/common` adds four optional chart metadata keys to
21
+ `BaseHealthResultMeta`: `x-chart-priority` (tile sort weight, lower first,
22
+ default 100), `x-chart-good-direction` (`"up" | "down"`, which direction
23
+ of change is an improvement; consumers fall back to
24
+ `x-anomaly-direction`), and `x-chart-true-label` / `x-chart-false-label`
25
+ (prose for a boolean field's values wherever they surface in text, e.g. a
26
+ dominance chip reading "Usually successful (98%)" instead of "Usually
27
+ true"). Built-in collector backends annotate their headline metrics and
28
+ boolean fields accordingly (purely additive metadata).
29
+ - `@checkstack/healthcheck-frontend` rebuilds the drawer: a hero status
30
+ banner (status pill, healthy %, avg latency, interval, last run with the
31
+ exact datetime on hover, full-width status ribbon) replaces the metric
32
+ tiles; the status timeline and latency heroes share the `ChartCard`
33
+ chrome; the auto-generated charts become a prioritized, click-to-expand
34
+ 2-up tile grid (collector ids demoted to hover titles); the anomaly
35
+ Expected/Trend derivation is consolidated into one tested module shared by
36
+ the latency hero and the tiles.
37
+
38
+ BREAKING CHANGES: `recharts` is removed from `@checkstack/healthcheck-frontend`
39
+ (and the unused dependency from `@checkstack/ui`); the
40
+ `HealthCheckStatusTimeline` and `SparklineTooltip` components are deleted.
41
+ Extensions rendering into `HealthCheckDiagramSlot` should build on the
42
+ `@checkstack/ui` chart primitives instead.
43
+
44
+ - Updated dependencies [c55d7c6]
45
+ - Updated dependencies [c55d7c6]
46
+ - @checkstack/healthcheck-common@1.13.0
47
+ - @checkstack/common@0.21.0
48
+ - @checkstack/backend-api@0.29.1
49
+
3
50
  ## 0.4.0
4
51
 
5
52
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/healthcheck-postgres-backend",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -14,9 +14,9 @@
14
14
  "pack": "bunx @checkstack/scripts plugin-pack"
15
15
  },
16
16
  "dependencies": {
17
- "@checkstack/backend-api": "0.29.0",
18
- "@checkstack/common": "0.20.0",
19
- "@checkstack/healthcheck-common": "1.12.0",
17
+ "@checkstack/backend-api": "0.29.1",
18
+ "@checkstack/common": "0.21.0",
19
+ "@checkstack/healthcheck-common": "1.13.0",
20
20
  "pg": "^8.11.0"
21
21
  },
22
22
  "devDependencies": {
@@ -24,7 +24,7 @@
24
24
  "@types/pg": "^8.11.0",
25
25
  "typescript": "^5.0.0",
26
26
  "@checkstack/tsconfig": "0.0.7",
27
- "@checkstack/scripts": "0.7.1"
27
+ "@checkstack/scripts": "0.7.2"
28
28
  },
29
29
  "description": "Checkstack healthcheck-postgres-backend plugin",
30
30
  "author": {
@@ -43,6 +43,7 @@ const queryResultSchema = healthResultSchema({
43
43
  // fire on routine data growth, so it is off by default. Still chartable
44
44
  // and opt-in per check.
45
45
  "x-anomaly-enabled": false,
46
+ "x-chart-priority": 30,
46
47
  }),
47
48
  executionTimeMs: healthResultNumber({
48
49
  "x-chart-type": "line",
@@ -54,12 +55,16 @@ const queryResultSchema = healthResultSchema({
54
55
  "x-anomaly-confirmation-window": 3,
55
56
  "x-anomaly-min-absolute-delta": 50,
56
57
  "x-anomaly-min-relative-delta": 0.5,
58
+ "x-chart-priority": 10,
57
59
  }),
58
60
  success: healthResultBoolean({
59
61
  "x-chart-type": "boolean",
60
62
  "x-chart-label": "Success",
63
+ "x-chart-true-label": "successful",
64
+ "x-chart-false-label": "failing",
61
65
  "x-anomaly-enabled": true,
62
66
  "x-anomaly-direction": "dominance",
67
+ "x-chart-good-direction": "up",
63
68
  }),
64
69
  });
65
70
 
@@ -79,6 +84,7 @@ const queryAggregatedFields = {
79
84
  "x-anomaly-confirmation-window": 3,
80
85
  "x-anomaly-min-absolute-delta": 50,
81
86
  "x-anomaly-min-relative-delta": 0.5,
87
+ "x-chart-priority": 10,
82
88
  }),
83
89
  successRate: aggregatedRate({
84
90
  "x-chart-type": "gauge",
package/src/strategy.ts CHANGED
@@ -67,8 +67,11 @@ const postgresResultSchema = healthResultSchema({
67
67
  connected: healthResultBoolean({
68
68
  "x-chart-type": "boolean",
69
69
  "x-chart-label": "Connected",
70
+ "x-chart-true-label": "connected",
71
+ "x-chart-false-label": "disconnected",
70
72
  "x-anomaly-enabled": true,
71
73
  "x-anomaly-direction": "dominance",
74
+ "x-chart-good-direction": "up",
72
75
  }),
73
76
  connectionTimeMs: healthResultNumber({
74
77
  "x-chart-type": "line",
@@ -80,6 +83,7 @@ const postgresResultSchema = healthResultSchema({
80
83
  "x-anomaly-confirmation-window": 3,
81
84
  "x-anomaly-min-absolute-delta": 50,
82
85
  "x-anomaly-min-relative-delta": 0.5,
86
+ "x-chart-priority": 10,
83
87
  }),
84
88
  error: healthResultString({
85
89
  "x-chart-type": "status",
@@ -104,6 +108,7 @@ const postgresAggregatedFields = {
104
108
  "x-anomaly-confirmation-window": 3,
105
109
  "x-anomaly-min-absolute-delta": 50,
106
110
  "x-anomaly-min-relative-delta": 0.5,
111
+ "x-chart-priority": 10,
107
112
  }),
108
113
  maxConnectionTime: aggregatedMinMax({
109
114
  "x-chart-type": "line",
@@ -114,6 +119,7 @@ const postgresAggregatedFields = {
114
119
  // alerts. Average connection time already covers the latency-saturation
115
120
  // signal, so the max is off by default and remains chartable.
116
121
  "x-anomaly-enabled": false,
122
+ "x-chart-good-direction": "down",
117
123
  }),
118
124
  successRate: aggregatedRate({
119
125
  "x-chart-type": "gauge",
@@ -134,6 +140,8 @@ const postgresAggregatedFields = {
134
140
  // failures as a normalized percent, so this absolute twin is off by default
135
141
  // to avoid duplicate, volume-sensitive alerts.
136
142
  "x-anomaly-enabled": false,
143
+ "x-chart-good-direction": "down",
144
+ "x-chart-priority": 90,
137
145
  }),
138
146
  };
139
147