Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

Commit 5082b10

Browse files
committed
docs: update reference.md
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
1 parent ee00470 commit 5082b10

File tree

2 files changed

+26
-21
lines changed

2 files changed

+26
-21
lines changed

docs/monitoring.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Propeller tracks OS-level metrics for every WebAssembly task running on proplets. The system collects CPU usage, memory consumption, disk I/O, thread counts, and more with minimal performance overhead.
66

7-
Both Go and Rust proplets include built-in monitoring using `gopsutil` for Go and `sysinfo` for Rust. These libraries provide cross-platform compatibility across Linux, macOS, and Windows environments.
7+
Propeller tracks OS-level metrics for every WebAssembly task running on proplets. The system collects CPU usage, memory consumption, disk I/O, thread counts, and more with minimal performance overhead. The Rust proplet includes built-in monitoring using the `sysinfo` crate for cross-platform metrics. This provides compatibility across Linux, macOS, and Windows environments.
88

99
## Architecture
1010

@@ -16,7 +16,9 @@ Each proplet monitors its running tasks independently and reports metrics to the
1616

1717
1. Proplet spawns a monitoring thread for each task
1818
2. Thread collects process metrics at configured intervals (1-120 seconds)
19-
3. Metrics are published to MQTT topic `m/{domain}/c/{channel}/metrics/proplet`
19+
3. Metrics are published to MQTT topics:
20+
- Proplet-level: `m/{domain}/c/{channel}/control/proplet/metrics`
21+
- Task-level: `m/{domain}/c/{channel}/control/proplet/task_metrics`
2022
4. Manager receives and stores metrics in memory
2123
5. API clients query metrics via HTTP endpoints
2224

docs/reference.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Process Monitoring Implementation
22

3-
This document describes the complete process monitoring implementation for both Go and Rust proplets in the Propeller distributed task execution system.
3+
This document describes the complete process monitoring implementation for Rust proplets in the Propeller distributed task execution system.
44

55
## Overview
66

@@ -12,18 +12,29 @@ Comprehensive OS-level process monitoring has been implemented for:
1212

1313
## Monitoring Profiles
1414

15-
Both implementations provide identical profiles:
15+
Profiles define which metrics to collect, how often, and how much history to retain.
16+
17+
18+
The Rust implementation provides two built-in profiles:
1619

1720
| Profile | Interval | Metrics | Export | History | Use Case |
1821
| ------------------- | -------- | ---------------------------------- | ------ | ------- | ------------------- |
1922
| Standard | 10s | All | Yes | 100 | General purpose |
20-
| Minimal | 60s | CPU, Memory | No | 0 | Lightweight |
21-
| Intensive | 1s | All | Yes | 1000 | Debug/analysis |
22-
| Batch Processing | 30s | CPU, Memory, Disk | Yes | 200 | Data processing |
23-
| Real-time API | 5s | CPU, Memory, Network, Threads, FDs | Yes | 500 | HTTP/API servers |
2423
| Long-running Daemon | 120s | All | Yes | 500 | Background services |
25-
| Disabled | - | None | No | 0 | No monitoring |
26-
24+
### Custom Profiles
25+
26+
You can also define custom monitoring profiles via JSON configuration with the following options:
27+
28+
- `enabled`: Enable/disable monitoring (default: `true`)
29+
- `interval`: Collection interval in seconds (default: `10`)
30+
- `collect_cpu`: Collect CPU metrics (default: `true`)
31+
- `collect_memory`: Collect memory metrics (default: `true`)
32+
- `collect_disk_io`: Collect disk I/O metrics (default: `true`)
33+
- `collect_threads`: Collect thread count (default: `true`)
34+
- `collect_file_descriptors`: Collect file descriptor count (default: `true`)
35+
- `export_to_mqtt`: Publish metrics to MQTT (default: `true`)
36+
- `retain_history`: Keep metrics history (default: `true`)
37+
- `history_size`: Maximum history entries (default: `100`)
2738
## Metrics Collected
2839

2940
### Common Metrics (All Platforms)
@@ -44,11 +55,10 @@ Both implementations provide identical profiles:
4455

4556
## MQTT Topics
4657

47-
### Proplet-Level Metrics (Go)
58+
### Proplet-Level Metrics
4859

4960
```txt
5061
m/{domain_id}/c/{channel_id}/control/proplet/metrics
51-
```
5262
5363
Publishes overall proplet health metrics.
5464
@@ -96,18 +106,12 @@ Publishes per-task process metrics.
96106

97107
## Configuration
98108

99-
### Go Proplet Environment Variables
100-
101-
```bash
102-
PROPLET_METRICS_INTERVAL=10 # Interval in seconds
103-
PROPLET_ENABLE_MONITORING=true # Enable/disable
104-
```
105109

106110
### Rust Proplet Environment Variables
107111

108112
```bash
109-
PROPLET_ENABLE_MONITORING=true # Enable/disable
110-
PROPLET_METRICS_INTERVAL=10 # Interval in seconds
113+
export PROPLET_ENABLE_MONITORING=true # Enable/disable monitoring (default: true)
114+
export PROPLET_METRICS_INTERVAL=10 # Proplet-level metrics interval in seconds (default: 10)
111115
```
112116

113117
### Per-Task Configuration (JSON)
@@ -142,7 +146,6 @@ Measured overhead across platforms:
142146

143147
## Usage Examples
144148

145-
### Go - Start Task with Monitoring
146149

147150
```go
148151
task := task.Task{

0 commit comments

Comments
 (0)