Skip to content

docs: design custom metrics collection path for node-level resource monitoring#521

Draft
Chulhee1Lee with Copilot wants to merge 2 commits into
mainfrom
copilot/design-custom-metrics-collection-path
Draft

docs: design custom metrics collection path for node-level resource monitoring#521
Chulhee1Lee with Copilot wants to merge 2 commits into
mainfrom
copilot/design-custom-metrics-collection-path

Conversation

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

The issue investigated whether Pullpiri's MonitoringServer could collect application-specific custom metrics (FPS, Latency) and deliver them to PolicyManager. The result: the App→MonitoringServer→etcd path already exists via StressMonitoringMetric, but the MonitoringServer→PolicyManager forwarding link is missing.

Findings

Existing (implemented):

  • SendStressMonitoringMetric gRPC RPC in MonitoringServerConnection with JSON payload supporting fps, latency, cpu_loads
  • process_stress_requests() loop in manager persists to etcd at /pullpiri/metrics/stress/{process}/{pid}

Missing (gaps):

  • Custom metrics never reach PolicyManager — ReportNodeMetricsRequest only carries NodeInfo
  • PolicyManager has no custom metric threshold evaluation
  • No REST endpoint in SettingsService to query custom metrics

Design Documents Added

doc/architecture/EN/LLD/custom_metrics.md and doc/architecture/KR/LLD/custom_metrics.md cover:

  • Gap analysis table mapping each path segment to its implementation status
  • Two design options for completing the MonitoringServer→PolicyManager path:
    • Option A (recommended for MVP): extend existing ReportNodeMetricsRequest with a repeated CustomMetric custom_metrics field
    • Option B (recommended long-term): add a dedicated ReportCustomMetrics RPC, decoupled from system metric cadence
  • CustomMetric interface definitionprocess_name, container_name, metric_name, metric_unit, value, timestamp_ms
  • FPS end-to-end example with proposed policy YAML structure
  • SettingsService REST extension (GET /api/v1/metrics/custom) using the already-implemented get_all_stress_metrics()

Design decision points (Option A vs B, batch vs immediate, structured vs JSON payload) are left for maintainer review.

Add LLD design documents for custom metrics collection path in
MonitoringServer. Documents cover:
- Analysis of existing StressMonitoringMetric gRPC path (App → MonitoringServer → etcd)
- Gap analysis: missing MonitoringServer → PolicyManager forwarding
- Design direction for extending policymanager.proto with CustomMetric
- Two design options (extend existing RPC vs new dedicated RPC)
- FPS metric example and policy definition structure
- SettingsService REST API extension proposal

Closes #520
Copilot AI changed the title [WIP] Investigate and design custom metrics collection path docs: design custom metrics collection path for node-level resource monitoring Jul 8, 2026
Copilot AI requested a review from Chulhee1Lee July 8, 2026 11:13
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.

[Design] Investigate and Design Custom Metrics Collection Path in Node-level Resource Monitoring

2 participants