Skip to content

Project 2 PR 1 (add libs/mofa-metrics crate with store, types, and HTTP/WS server)#43

Open
AdityaShome wants to merge 1 commit intomofa-org:mainfrom
AdityaShome:mofa-metrics-store
Open

Project 2 PR 1 (add libs/mofa-metrics crate with store, types, and HTTP/WS server)#43
AdityaShome wants to merge 1 commit intomofa-org:mainfrom
AdityaShome:mofa-metrics-store

Conversation

@AdityaShome
Copy link
Copy Markdown

Changes

New standalone crate libs/mofa-metrics providing the core data layer for real time pipeline observability. Zero Makepad dependency, will be added in later prs.
Closes: #14

Files

File Purpose
libs/mofa-metrics/Cargo.toml Dependencies: axum (+ws), tokio, serde, parking_lot, futures, tower-http
src/types.rs AgentState, AgentStatus, PipelineTrace, SystemSnapshot, MetricEvent
src/store.rs Arc<MetricsStore> with dirty-flag tracking, ring-buffered traces/snapshots, broadcast
src/server.rs axum HTTP server (4 REST endpoints + WebSocket), background tokio task
src/lib.rs Module declarations and re-exports
Cargo.toml (root) Added libs/mofa-metrics to workspace members

API

Endpoint Description
GET /api/agents All node statuses
GET /api/agents/{id} Single node status
GET /api/metrics Latest system snapshot
GET /api/pipeline Recent pipeline traces
WS /ws Real-time MetricEvent stream

Tests

5 unit tests covering dirty flag semantics, agent upsert, ring buffer caps, and snapshot ordering.

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.

Studio Observability Dashboard [Issue 1]

1 participant