feat(health): serve prometheus and thanos under the metricsDb service - #650
Merged
Merged
Conversation
This was referenced Sep 5, 2026
Merged
Pairs with the cubecos S[MetricsDb] check item and the cube-cos-openapi spec bump. api/docs.json is gitignored and regenerated from the submodule by 'task generateApiDocs', so only module.go and the submodule pointer move. The submodule is pinned to a34418d on cube-cos-openapi's feat/metricsdb-service; re-pin to develop once that PR merges. Verified: submodule docs.yaml carries metricsDb, yq regenerates a valid docs.json carrying it too, and CGO_ENABLED=0 go build ./api/... ./internal/... is clean with it embedded. 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>
Eandalf-Bigstack
force-pushed
the
feat/metricsdb-service
branch
from
September 10, 2026 07:08
aa39b66 to
71c68b0
Compare
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?
Serves
prometheusandthanosunder a newmetricsDbservice in theinfrascopecategory.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), a different concern from the time-series database behind it, so this is a sibling service rather than an extension ofmetrics.influxdbandkapacitorstay undernotifications: kapacitor is a write proxy and alerting engine here, not only storage, so moving that pair is a separate decision.Only two things move:
internal/cubecos/module.go— the new service entry, both modules repairableapi/cube-cos-openapi— submodule pointer09b7d76→a34418dapi/docs.jsonis gitignored and regenerated from the submodule bytask generateApiDocs, so it is deliberately not in the diff.Test results (optional)
1). make sure the api docs have been updated
The submodule now carries a
docs.yamlwith themetricsDbservice, and the generator reproduces it:4 occurrences = 1
/servicesresponse example + 3 service-name enums (health history ×2, module repair).2). make sure the api works properly
The build matters here specifically because
api/docs.jsonis embedded via//go:embedinapi/docs.go— a spec that failed to generate would fail the compile rather than pass silently.Dependencies
Depends on bigstack-oss/cube-cos-openapi#111 — merge that first.
The submodule is pinned to
a34418d, which currently exists only on that PR's feature branch. Once #111 merges, this pointer should be re-pinned todevelopsodevelophere never references a commit reachable only from a feature branch.Sibling PR, same stack, independent of this one: bigstack-oss/cube-cos-ui (UI labels + regenerated SDK enum). The CubeCOS-side change is in bigstack-oss/cubecos on
jim.lin/feat/replace-monasca-1.