Skip to content

feat(health): add the metricsDb service under infrascope - #111

Merged
github-actions[bot] merged 1 commit into
developfrom
feat/metricsdb-service
Sep 9, 2026
Merged

github-actions[bot] merged 1 commit into
developfrom
feat/metricsdb-service

Conversation

@Eandalf-Bigstack

Copy link
Copy Markdown
Contributor

What type of PR is this?

feature

Which issue(s) this PR fixes?

Refs bigstack-oss/cubecos#672

What this PR does?

Adds a metricsDb service under the infrascope category, holding prometheus and thanos.

CubeCOS grew Prometheus and Thanos as its metric persistence layer, and neither had a service to report under. metrics is collection and visualisation (monasca, telegraf, grafana, lachesis), which is a different concern from the time-series database behind it — so this is a new sibling service rather than an extension of metrics.

influxdb and kapacitor stay under notifications for now. Kapacitor is a write proxy and alerting engine in this deployment, not only storage, so moving that pair is a separate decision with its own consumer blast radius.

Changes:

  • the /services response example gains the metricsDb entry
  • the three service-name enums gain metricsDb (health history ×2, module repair)

Test results (optional)

docs.yaml parses, and both generated consumers were rebuilt against this commit rather than hand-edited:

  • cube-cos-apiyq -o=json -I=4 api/cube-cos-openapi/docs.yaml > api/docs.json (what task generateApiDocs runs) produces a valid 1,405,915-byte document carrying 4 metricsDb occurrences (1 example + 3 enums). go build ./api/... ./internal/... is clean with it embedded via //go:embed, and a full cgo build through docker compose run --rm cube-cos-api-builder succeeds.
  • cube-cos-uipnpm api:generate regenerates sdk/api.ts with a diff confined to three JSDoc @type unions and three enum members (+6 −3, no generator churn). tsc across all 7 workspace projects, eslint, and web-app:build all pass.

Dependencies

None — this is the base of a three-repo stack, and the two below pin this commit as a submodule:

  • bigstack-oss/cube-cos-api
  • bigstack-oss/cube-cos-ui

Both should merge after this one. Their submodule pointers currently reference a34418d on this feature branch, so they need re-pinning to develop once this lands.

The matching CubeCOS-side change (the S[MetricsDb] check item plus the Prometheus and Thanos health checks) is in bigstack-oss/cubecos on jim.lin/feat/replace-monasca-1.

Prometheus and Thanos are the metric persistence layer and had no service of
their own. metrics stays collection and visualisation; influxdb and kapacitor
stay under notifications for now, since kapacitor is a write proxy and alerting
engine here, not only storage.

Adds the service to the /services example and to the three service-name enums
(health history x2, module repair).

Signed-off-by: Jim Lin <jim.lin@bigstack.co>
Co-authored-by: Eandalf <clinah@connect.ust.hk>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

@raven-pan raven-pan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Eandalf-Bigstack Eandalf-Bigstack added the done Merge the pull request label Sep 9, 2026
@github-actions
github-actions Bot merged commit a34418d into develop Sep 9, 2026
4 checks passed
@Eandalf-Bigstack
Eandalf-Bigstack deleted the feat/metricsdb-service branch September 9, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

done Merge the pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants