Download observability/__init__.py from ACA050/aegislm: direct link, hf CLI and curl.
- Browser
- Download file 2.52 kB
-
https://huggingface.co/spaces/ACA050/aegislm/resolve/main/observability/__init__.py
- Command line
-
hf download hf://spaces/ACA050/aegislm/observability/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/ACA050/aegislm/resolve/main/observability/__init__.py
2.52 kB
| """ | |
| AegisLM Observability Module | |
| Provides comprehensive observability features: | |
| - Metrics collection and export (Prometheus-style) | |
| - Health checks (liveness and readiness) | |
| - Alert routing and escalation | |
| - Production readiness auditing | |
| - Dashboard documentation | |
| This module enables production-grade monitoring and operational reliability. | |
| """ | |
| from observability.metrics import ( | |
| MetricsRegistry, | |
| get_metrics_registry, | |
| MetricType, | |
| AlertLevel, | |
| Counter, | |
| Gauge, | |
| Histogram, | |
| ) | |
| from observability.exporters import ( | |
| PrometheusExporter, | |
| get_prometheus_exporter, | |
| export_prometheus_metrics, | |
| ) | |
| from observability.alert_router import ( | |
| AlertRouter, | |
| AlertHandler, | |
| LogHandler, | |
| AlertEscalationTracker, | |
| Alert, | |
| AlertLevel, | |
| AlertCategory, | |
| get_alert_router, | |
| send_drift_alert, | |
| send_security_alert, | |
| send_robustness_alert, | |
| ) | |
| from observability.health_checks import ( | |
| LivenessResponse, | |
| ReadinessResponse, | |
| liveness_check, | |
| readiness_check, | |
| check_database_connection, | |
| check_worker_pool, | |
| check_model_loader, | |
| check_policy_config, | |
| check_dataset_registry, | |
| check_secret_manager, | |
| get_uptime_seconds, | |
| ) | |
| from observability.readiness_audit import ( | |
| ReadinessAuditor, | |
| ReadinessCheck, | |
| ReadinessReport, | |
| get_readiness_auditor, | |
| run_readiness_audit, | |
| SLO_CONFIG, | |
| ) | |
| __version__ = "0.1.0" | |
| __all__ = [ | |
| # Metrics | |
| "MetricsRegistry", | |
| "get_metrics_registry", | |
| "MetricType", | |
| "AlertLevel", | |
| "Counter", | |
| "Gauge", | |
| "Histogram", | |
| # Exporters | |
| "PrometheusExporter", | |
| "get_prometheus_exporter", | |
| "export_prometheus_metrics", | |
| # Alert Router | |
| "AlertRouter", | |
| "AlertHandler", | |
| "LogHandler", | |
| "AlertEscalationTracker", | |
| "Alert", | |
| "AlertLevel", | |
| "AlertCategory", | |
| "get_alert_router", | |
| "send_drift_alert", | |
| "send_security_alert", | |
| "send_robustness_alert", | |
| # Health Checks | |
| "LivenessResponse", | |
| "ReadinessResponse", | |
| "liveness_check", | |
| "readiness_check", | |
| "check_database_connection", | |
| "check_worker_pool", | |
| "check_model_loader", | |
| "check_policy_config", | |
| "check_dataset_registry", | |
| "check_secret_manager", | |
| "get_uptime_seconds", | |
| # Readiness Audit | |
| "ReadinessAuditor", | |
| "ReadinessCheck", | |
| "ReadinessReport", | |
| "get_readiness_auditor", | |
| "run_readiness_audit", | |
| "SLO_CONFIG", | |
| ] | |