Context
Parent issue: #367 (Serve fine-tuned models to end-users)
Code review on PR #379 identified missing observability as a medium-priority gap.
Scope
Add Prometheus metrics and structured logging for LoRA adapter lifecycle:
Metrics
lora_adapters_total (gauge): Number of adapters by state (active/loading/offloaded/failed)
lora_adapter_deploy_duration_seconds (histogram): Time to download + decrypt + deploy
lora_adapter_operations_total (counter): Operations by type (deploy/offload/restore/fail)
lora_event_watcher_lag_blocks (gauge): current_block - last_processed_block
lora_storage_download_bytes_total (counter): Bytes downloaded from 0G Storage
lora_inference_requests_total (counter): Requests by adapter name
Logging
- Structured fields for adapter operations (taskID, userAddress, adapterName)
- Request tracing through proxy → ownership check → backend
Acceptance Criteria
Context
Parent issue: #367 (Serve fine-tuned models to end-users)
Code review on PR #379 identified missing observability as a medium-priority gap.
Scope
Add Prometheus metrics and structured logging for LoRA adapter lifecycle:
Metrics
lora_adapters_total(gauge): Number of adapters by state (active/loading/offloaded/failed)lora_adapter_deploy_duration_seconds(histogram): Time to download + decrypt + deploylora_adapter_operations_total(counter): Operations by type (deploy/offload/restore/fail)lora_event_watcher_lag_blocks(gauge):current_block - last_processed_blocklora_storage_download_bytes_total(counter): Bytes downloaded from 0G Storagelora_inference_requests_total(counter): Requests by adapter nameLogging
Acceptance Criteria
/metricsendpoint