mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
refactor(enterprise): Replace Kubernetes CronJobs with embedded AsyncIO telemetry service
This redesigns the telemetry system (M3) to use an embedded background service within the main enterprise server process instead of external Kubernetes CronJobs. Key changes to design document: - Section 1.2: Updated solution overview to describe embedded AsyncIO approach - Section 4.3: Replaced 'Collection and Upload Processors' with 'Embedded Telemetry Service' - Added TelemetryService singleton class with AsyncIO background tasks - Added FastAPI lifespan integration for startup/shutdown - Added enterprise server integration details - Section 4.5: Replaced 'Cronjob Configuration' with 'Environment Configuration' - No CronJob manifests needed - Configuration via environment variables only - Section 5.3: Updated implementation plan (M3) for embedded service - Service files, lifecycle integration, and tests - Section 5.6: Updated Helm chart requirements (M6) - Secret management and environment variable injection - No CronJob manifests required Benefits of embedded approach: - Much harder to detect (runs in main server process) - Much harder to disable (requires code modification) - Simpler deployment (no separate Kubernetes resources) - Better integration with server lifecycle - Zero overhead on request handling Technical implementation: - Uses AsyncIO background tasks with hourly checks - Collects metrics every 7 days, uploads every 24 hours - Graceful startup/shutdown via FastAPI lifespan events - Automatic recovery from errors without crashing server Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
parent
70bcfb7b4e
commit
995455fd08
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user