PLATFORM SYSTEMS
Observability
OrbitMesh 必须让用户和运维者能够回答:
View source1. 目标
OrbitMesh 必须让用户和运维者能够回答:
- 哪个 Node 在线。
- 哪个 Traffic Exit 慢。
- 哪个 Endpoint 不可用。
- 哪个服务不可用。
- 哪次配置发布失败。
- 哪个租户用量异常。
- Edge Runtime 是否正常工作。
2. 组成
- Metrics。
- Logs。
- Traces。
- Events。
- Audit Logs。
3. Metrics
指标命名:
orbitmesh_node_online
orbitmesh_edge_runtime_heartbeat_age_seconds
orbitmesh_runtime_binding_status
orbitmesh_capability_binding_status
orbitmesh_endpoint_ready
orbitmesh_runtime_reload_total
orbitmesh_runtime_reload_failed_total
orbitmesh_desired_state_version
orbitmesh_config_apply_total
orbitmesh_config_apply_failed_total
orbitmesh_health_probe_latency_ms
orbitmesh_subscription_fetch_total
orbitmesh_traffic_usage_bytes_total
orbitmesh_node_traffic_bytes_total
orbitmesh_node_cpu_cores
orbitmesh_node_cpu_usage_ratio
orbitmesh_node_load1
orbitmesh_node_load5
orbitmesh_node_load15
orbitmesh_node_memory_total_bytes
orbitmesh_node_memory_available_bytes
orbitmesh_node_memory_used_bytes
orbitmesh_node_memory_usage_ratio
orbitmesh_node_disk_total_bytes
orbitmesh_node_disk_used_bytes
orbitmesh_node_disk_usage_ratio
orbitmesh_node_network_rx_bytes_total
orbitmesh_node_network_tx_bytes_total
orbitmesh_node_network_rx_bps
orbitmesh_node_network_tx_bps
维度:
- tenant_id。
- node_id。
- capability。
- role。
- capability_binding_id。
- runtime_binding_id。
- endpoint_id。
- provider。
- region。
- runtime。
- metering_point。
- direction。
- service。
Traffic usage and node traffic must remain separate views:
client_accessis accounting traffic and feeds quota by default.exit_egress,relay_transit,mesh_transit, andruntime_localare infrastructure traffic and feed diagnostics, capacity, and cost views by default.- Prometheus can mirror these values later, but the Control Plane database remains the source of truth for quota and billing decisions.
Node system metrics are host-level runtime observations:
- CPU cores, CPU usage, load average, memory, root disk, and network interface counters are reported through
runtime_metric_samples. - Network bandwidth metrics represent node interface throughput, not subscription accounting traffic.
- The first implementation is Linux-first and reads
/procplus filesystem stats locally in Edge Runtime. - Sampling is tied to the existing Edge Runtime observation cycle, which is normally driven by
sync_interval. The default is 30 seconds. - Do not add a high-frequency metrics ticker until rollup, retention, and console aggregation are in place.
- Runtime process-level metrics, per-runtime disk usage, and custom
metrics_intervalare later-stage extensions.
4. Logs
日志类型:
- API access log。
- Control Plane app log。
- Edge Runtime log。
- Runtime apply log。
- Health probe log。
- Audit log。
日志要求:
- request_id。
- tenant_id。
- user_id。
- node_id。
- runtime_binding_id。
- capability_binding_id。
- event。
- error。
不得记录:
- 完整 token。
- 用户 runtime password。
- TLS 私钥。
- 完整 subscription URL。
5. Traces
需要追踪:
- 创建 enrollment token。
- Node 注册。
- Desired State 生成。
- Runtime Configuration 编译。
- Edge Runtime 拉取配置。
- Edge Runtime 应用配置。
- Subscription fetch。
6. Audit Logs
审计事件:
- 登录。
- enroll Node。
- 删除 Node。
- 启用或禁用 Capability Binding。
- 修改 Runtime Binding。
- 修改 Traffic Policy。
- 发布配置。
- 吊销 Subscription。
- 修改套餐。
7. Console
页面:
- Overview。
- Nodes。
- Node Traffic。
- Traffic Subscriptions。
- Traffic Policies。
- Usage & Quotas。
- Endpoints。
- Domains & Certificates。
- Runtime Catalog。
- Audit。
8. MVP
P0:
- Node 在线状态。
- 心跳时间。
- Runtime Binding 状态。
- Capability Binding 状态。
- 配置应用结果。
- 健康引擎结果。
- Client access usage and quota state。
- Node traffic metering point model。
P1:
- Exit egress and relay transit traffic collection。
- Prometheus。
- Grafana dashboard。
- Loki。
- OpenTelemetry。
9. 验收标准
- Node 离线 60 秒后 Console 标记 offline。
- 配置 apply 失败能看到错误。
- GitHub 探测延迟可视化。
- 审计能看到谁修改了路由。