-
Notifications
You must be signed in to change notification settings - Fork 0
MONITORING_ARCHITECTURE.md
Version: 1.0 Project: CeloHT
This document defines the monitoring architecture used to observe CeloHT applications, infrastructure, APIs, databases, blockchain integrations, and security events.
Monitoring should provide early detection of failures and abnormal behavior.
Applications
│
├──────────────┐
▼ ▼
Logs Metrics
│ │
└──────┬───────┘
▼
Observability
Layer
│
┌──────┼──────┐
▼ ▼ ▼
Alerts Dashboards Analysis
│
▼
Incident Response
CeloHT monitoring should cover:
- Frontend
- API
- Database
- Infrastructure
- Blockchain
- Smart contracts
- CI/CD
- Security
- Business metrics
Monitor:
- Application availability
- Page errors
- JavaScript errors
- API failures
- Response latency
- User-facing failures
Track:
Request Rate
Error Rate
Latency
Status Codes
Authentication Failures
Rate Limits
Useful indicators include:
- Requests per minute
- Error percentage
- p50 latency
- p95 latency
- p99 latency
Monitor:
- Availability
- CPU
- Memory
- Storage
- Connections
- Query latency
- Slow queries
- Backup status
- Failed queries
Infrastructure monitoring should include:
- CPU utilization
- Memory utilization
- Disk usage
- Network traffic
- Service availability
- Deployment status
Monitor:
- RPC availability
- Transaction submission
- Transaction failures
- Confirmation delays
- Network mismatch errors
- Contract events
Where appropriate, monitor:
- Contract events
- Administrative changes
- Large transfers
- Unexpected activity
- Failed transactions
- Pause/unpause operations
High-value contract events should receive increased monitoring attention.
Treasury monitoring should focus on:
- Transfers
- Authorized signers
- Large transactions
- Unexpected destinations
- Administrative changes
Example:
Treasury Event
│
▼
Detection
│
▼
Risk Evaluation
│
┌────┴────┐
▼ ▼
Normal Suspicious
│
▼
Alert
Security monitoring should detect:
- Authentication anomalies
- Repeated failed access
- Suspicious API activity
- Privilege changes
- Secret exposure
- Unexpected deployments
- Abnormal blockchain activity
Track:
- Build failures
- Deployment failures
- Unexpected workflow changes
- Failed security checks
- Dependency alerts
- Deployment frequency
Technical monitoring should be complemented by business metrics.
Potential CeloHT indicators:
- Users trained
- Completed training
- Active agents
- Transactions
- Remittance activity
- Reforestation activity
- Revenue
- Community participation
Each metric must have a documented definition.
Alerts should be actionable.
Bad alert:
Something happened.
Better alert:
API error rate exceeded threshold for 10 minutes.
An alert should ideally include:
- What happened
- When it happened
- Affected service
- Severity
- Relevant diagnostic information
Immediate response required.
Prompt investigation required.
Investigation during normal operational windows.
Informational or trend monitoring.
Recommended dashboards:
Availability
API Errors
Latency
Infrastructure
Database
RPC Health
Transactions
Failures
Confirmation Times
Contract Events
Authentication Failures
Suspicious Requests
Privileged Changes
Security Alerts
Users Trained
Agents
Transactions
Reforestation
Revenue
Logs should be:
- Structured
- Searchable
- Timestamped
- Correlated using request IDs where appropriate
Logs must not contain:
- Private keys
- Seed phrases
- Passwords
- API secrets
- Sensitive authentication tokens
Where possible:
User Request
│
▼
Request ID
│
├── API Log
├── Database Log
├── Blockchain Operation
└── Error Event
This allows engineers to trace failures across system boundaries.
Monitoring data should have defined retention periods.
Security logs may require longer retention than ordinary application logs.
Retention should balance:
- Investigation needs
- Cost
- Privacy
- Compliance requirements
Monitoring connects directly to incident response.
Monitoring
│
▼
Alert
│
▼
Triage
│
▼
Incident Response
│
▼
Recovery
│
▼
Post-Incident Review
[ ] Frontend monitored
[ ] API monitored
[ ] Database monitored
[ ] Infrastructure monitored
[ ] RPC monitored
[ ] Smart contracts monitored
[ ] CI/CD monitored
[ ] Security monitored
[ ] Business metrics monitored
[ ] Alerts configured
[ ] Dashboards available
[ ] Logs protected
You cannot reliably secure or operate what you cannot observe.
Document: Monitoring Architecture Version: 1.0 Project: CeloHT
© 2026 CeloHT - Open Source. Global Impact. Licensed under Apache.