@checkstack/healthcheck-postgres-backend 0.4.0 → 0.4.2

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,62 @@
1
1
  # @checkstack/healthcheck-postgres-backend
2
2
 
3
+ ## 0.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [390d9cf]
8
+ - Updated dependencies [fc64fad]
9
+ - Updated dependencies [9d30324]
10
+ - @checkstack/backend-api@0.30.0
11
+ - @checkstack/healthcheck-common@1.14.0
12
+
13
+ ## 0.4.1
14
+
15
+ ### Patch Changes
16
+
17
+ - c55d7c6: Unify the healthcheck chart system on the `@checkstack/ui` SVG kit and
18
+ redesign the HealthCheck drawer.
19
+
20
+ - `@checkstack/ui` gains six chart primitives (each with a Storybook story):
21
+ `StackedTimeline` (stacked status counts per bucket on the colorblind-safe
22
+ status triad), `ChartTooltip` + `useBandHover` (the one shared chart
23
+ tooltip and its cursor hit-testing), `ChartCard` / `chartCardChromeClass`
24
+ (the premium gradient card chrome, flat on low-power devices), `StatTile`
25
+ (number-led metric tile with delta chip, sparkline/ribbon footer, and
26
+ click-to-expand disclosure), `DistributionBar` (stacked horizontal
27
+ distribution + legend, replaces pies), and `CategoryRibbon` (categorical
28
+ history ribbon). `TimeSeriesChart` gains a hover tooltip with a crosshair
29
+ marker.
30
+ - `@checkstack/common` adds four optional chart metadata keys to
31
+ `BaseHealthResultMeta`: `x-chart-priority` (tile sort weight, lower first,
32
+ default 100), `x-chart-good-direction` (`"up" | "down"`, which direction
33
+ of change is an improvement; consumers fall back to
34
+ `x-anomaly-direction`), and `x-chart-true-label` / `x-chart-false-label`
35
+ (prose for a boolean field's values wherever they surface in text, e.g. a
36
+ dominance chip reading "Usually successful (98%)" instead of "Usually
37
+ true"). Built-in collector backends annotate their headline metrics and
38
+ boolean fields accordingly (purely additive metadata).
39
+ - `@checkstack/healthcheck-frontend` rebuilds the drawer: a hero status
40
+ banner (status pill, healthy %, avg latency, interval, last run with the
41
+ exact datetime on hover, full-width status ribbon) replaces the metric
42
+ tiles; the status timeline and latency heroes share the `ChartCard`
43
+ chrome; the auto-generated charts become a prioritized, click-to-expand
44
+ 2-up tile grid (collector ids demoted to hover titles); the anomaly
45
+ Expected/Trend derivation is consolidated into one tested module shared by
46
+ the latency hero and the tiles.
47
+
48
+ BREAKING CHANGES: `recharts` is removed from `@checkstack/healthcheck-frontend`
49
+ (and the unused dependency from `@checkstack/ui`); the
50
+ `HealthCheckStatusTimeline` and `SparklineTooltip` components are deleted.
51
+ Extensions rendering into `HealthCheckDiagramSlot` should build on the
52
+ `@checkstack/ui` chart primitives instead.
53
+
54
+ - Updated dependencies [c55d7c6]
55
+ - Updated dependencies [c55d7c6]
56
+ - @checkstack/healthcheck-common@1.13.0
57
+ - @checkstack/common@0.21.0
58
+ - @checkstack/backend-api@0.29.1
59
+
3
60
  ## 0.4.0
4
61
 
5
62
  ### 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.2",
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.30.0",
18
+ "@checkstack/common": "0.21.0",
19
+ "@checkstack/healthcheck-common": "1.14.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