feat(health): add the metricsDb service under infrascope - #111
Merged
Merged
Conversation
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>
This was referenced Sep 5, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
feature
Which issue(s) this PR fixes?
Refs bigstack-oss/cubecos#672
What this PR does?
Adds a
metricsDbservice under theinfrascopecategory, holdingprometheusandthanos.CubeCOS grew Prometheus and Thanos as its metric persistence layer, and neither had a service to report under.
metricsis 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 ofmetrics.influxdbandkapacitorstay undernotificationsfor 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:
/servicesresponse example gains themetricsDbentrymetricsDb(health history ×2, module repair)Test results (optional)
docs.yamlparses, and both generated consumers were rebuilt against this commit rather than hand-edited:yq -o=json -I=4 api/cube-cos-openapi/docs.yaml > api/docs.json(whattask generateApiDocsruns) produces a valid 1,405,915-byte document carrying 4metricsDboccurrences (1 example + 3 enums).go build ./api/... ./internal/...is clean with it embedded via//go:embed, and a full cgo build throughdocker compose run --rm cube-cos-api-buildersucceeds.pnpm api:generateregeneratessdk/api.tswith a diff confined to three JSDoc@typeunions and three enum members (+6 −3, no generator churn).tscacross all 7 workspace projects,eslint, andweb-app:buildall pass.Dependencies
None — this is the base of a three-repo stack, and the two below pin this commit as a submodule:
Both should merge after this one. Their submodule pointers currently reference
a34418don this feature branch, so they need re-pinning todeveloponce this lands.The matching CubeCOS-side change (the
S[MetricsDb]check item plus the Prometheus and Thanos health checks) is in bigstack-oss/cubecos onjim.lin/feat/replace-monasca-1.