Skip to content

Add mint monitor snapshot API and dashboard panel - #142

Draft
joelklabo wants to merge 1 commit into
cashubtc:masterfrom
joelklabo:max/run14-mint-monitoring-snapshot
Draft

Add mint monitor snapshot API and dashboard panel#142
joelklabo wants to merge 1 commit into
cashubtc:masterfrom
joelklabo:max/run14-mint-monitoring-snapshot

Conversation

@joelklabo

Copy link
Copy Markdown

Summary

  • add a new mint_monitor GraphQL query that returns:
    • mint DB entry counts (mints, melts, proofs, promises, total)
    • recent request volume (mint + melt quotes over trailing 24h)
    • host-level disk and CPU snapshot metrics
  • expose the query in the client MintService (loadMintMonitor)
  • add a Mint Dashboard monitoring panel that surfaces the snapshot directly in the admin UI

Why

This is a focused contribution toward cashubtc/nutshell#556's monitoring requirement:

  • "number of entries in the database"
  • "number of requests in recent past"
  • "free disk space" and "used CPU"

Validation

  • npm run test:server -- src/server/modules/api/mint/monitor/mintmonitor.service.spec.ts
  • npx eslint src/server/modules/api/mint/monitor/*.ts src/client/modules/mint/services/mint/mint.service.ts src/client/modules/mint/services/mint/mint.queries.ts src/client/modules/mint/types/mint.types.ts src/client/modules/mint/modules/mint-subsection-dashboard/components/mint-subsection-dashboard/mint-subsection-dashboard.component.ts
  • npx prettier --check src/server/modules/api/mint/monitor/*.ts src/client/modules/mint/services/mint/mint.service.ts src/client/modules/mint/services/mint/mint.queries.ts src/client/modules/mint/types/mint.types.ts src/client/modules/mint/modules/mint-subsection-dashboard/components/mint-subsection-dashboard/mint-subsection-dashboard.component.ts src/client/modules/mint/modules/mint-subsection-dashboard/components/mint-subsection-dashboard/mint-subsection-dashboard.component.html src/client/modules/mint/modules/mint-subsection-dashboard/components/mint-subsection-dashboard/mint-subsection-dashboard.component.scss src/server/modules/api/api.module.ts

Notes

  • Full npm run build exits early in this local environment (Node v25.2.1, project expects >=22 <23).
  • The feature itself is covered by targeted server tests + lint/format checks above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant