Skip to content

feat(health): show the metricsDb service with prometheus and thanos - #867

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

What this PR does / why we need it

Shows the new metricsDb service, holding Prometheus and Thanos, on the home health page.

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), a different concern from the time-series database behind it, so this is a sibling service rather than an extension of metrics. InfluxDB and Kapacitor stay under notifications: Kapacitor is a write proxy and alerting engine in this deployment, not only storage, so moving that pair is a separate decision.

Two things change:

  • homeHealthPageUtils.tsmetricsDb: 'Metrics DB' in serviceNameLabelMap, and prometheus: 'Prometheus' / thanos: 'Thanos' in moduleNameLabelMap. Without these the page falls back to upperFirst(name) and logs a Cannot find the label for… warning
  • packages/cube-frontend-api/cube-cos-openapi — submodule pointer 09b7d76a34418d, and sdk/api.ts regenerated from it

Which issue(s) this PR fixes

Refs bigstack-oss/cubecos#672

Special notes for your reviewer

sdk/api.ts is generated, not hand-edited. It was produced by pnpm api:generate against the bumped submodule. The diff is +6 −3 and confined to three JSDoc @type unions gaining 'metricsDb' and three MetricsDb: 'metricsDb', enum members — no generator churn, so it should read as a mechanical bump.

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, so once #111 merges the pointer should be re-pinned to develop rather than left referencing a feature-branch commit.

Sibling PR in the same stack, independent of this one: bigstack-oss/cube-cos-api#650. The CubeCOS-side change is in bigstack-oss/cubecos on jim.lin/feat/replace-monasca-1.

Additional documentation

Regenerated the SDK and rebuilt the workspace end to end on WORK_STATION
(node v24.15.0, pnpm 10.33.0):

  $ pnpm run api:generate      GEN_RC=0
  $ pnpm run tsc               TSC_RC=0      # 7 of 8 workspace projects, all Done
  $ pnpm run eslint            ESLINT_RC=0
  $ pnpm run web-app:build     BUILD_RC=0    # built in 3.37s

The generated diff, in full:

  -  * @type {... | 'dataPipe' | 'metrics' | 'logAnalytics' | 'notifications'}
  +  * @type {... | 'dataPipe' | 'metrics' | 'metricsDb' | 'logAnalytics' | 'notifications'}     (x3)
  +    MetricsDb: 'metricsDb',                                                                   (x3)

tsc covers cube-frontend-web-app, so the three new label entries are type-checked
against Record<string, string> rather than only inspected.

@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

Adds the display labels for the new metricsDb service and its two modules, and
picks up the generated SDK enum from the cube-cos-openapi bump.

sdk/api.ts is regenerated by 'pnpm api:generate' from the submodule, not edited
by hand; the diff is confined to three JSDoc @type unions and three enum
members. The submodule is pinned to a34418d on cube-cos-openapi's
feat/metricsdb-service -- re-pin to develop once that PR merges.

Verified with api:generate, tsc across all 7 workspace projects, eslint, and
the web-app build -- all clean.

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 Eandalf-Bigstack added the done Merge the pull request label Sep 9, 2026
@github-actions
github-actions Bot merged commit 570ec1f into develop Sep 9, 2026
9 checks passed
@Eandalf-Bigstack
Eandalf-Bigstack deleted the feat/metricsdb-service branch September 9, 2026 08:53
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