WebSocket Metrics Endpoint for Real-Time Broker Monitoring#6
Open
otabek05 wants to merge 5 commits into
Open
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…install guides - Build React with Vite → embed via rust-embed into Rust binary (single binary) - Serve React SPA from axum fallback handler; assets served by content type - Restructure router: auth middleware only on /api/v1 routes, SPA bypasses it - Config default path: /etc/coremq/config.yaml (fallback to local for dev) - Data default path: /etc/coremq/data/coremq.redb (COREMQ_DATA env override) - config.yaml updated to use /etc/coremq/ paths for Casbin model/policy - axios.ts: use window.location.origin in production, port 18083 in dev - Dockerfile: 3-stage build (node → rust → debian-slim runtime) - docker-compose.yml: all ports exposed, /etc/coremq volume mounted - build.rs: creates client/dist/ if missing so rust-embed always compiles - Makefile: add build, build-client, build-server, docker-*, install-config targets - docs/install-linux.md, docs/install-macos.md, docs/install-windows.md added Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… run Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
feat: add WebSocket metrics endpoint for real-time broker monitoring
Branch:
feat/ws-metrics-endpoint→mainSummary
GET /api/v1/ws/metricsWebSocket endpoint that pushes a JSON metrics frame every secondGetStatsadmin command wired through the engine's command channel for non-blocking stat queriesChanges
src/api/controllers/metrics.rsMetricsFrameevery 1 s viasysinfo+ engine querysrc/api/router.rs/api/v1/ws/metricsroutesrc/engine/commands.rsGetStats(oneshot::Sender<(usize, Vec<TopicInfo>)>)variantsrc/engine/engine.rsGetStats— delegates toclient_serviceandtopic_servicesrc/services/session.rsclient_count() -> usizehelperCargo.toml/Cargo.locksysinfodependency for process-level metricsTest Plan
ws://<host>/api/v1/ws/metricsclient_countchanges as MQTT clients connect/disconnectmemory_mbandcpu_percentreflect real process statsRelated Issue
Closes #