seai2526-uniba-TheClouds/code-comment-classification-monitoring
Overview
CodeCommentClassification is an end-to-end pipeline to classify comment sentences into language-specific categories and to aggregate results at file/PR level so reviewers can focus on rationale, usage notes, deprecations, examples, and other high-value signals.
The project targets and aims to surpass the NLBSE’26 baselines, providing reproducible training, evaluation, and inference.
The full documentation is available here: https://se4ai2526-uniba.github.io/TheClouds/
Monitoring
This space implements monitoring tools for the Code Comment Classification API hosted here: https://huggingface.co/spaces/seai2526-uniba-TheClouds/Code-Comment-Classification-Api
Prometheus
Prometheus scrapes metrics from the Code Comment Classification API and from itself, storing time-series data used for alerting and dashboards. It is configured to:
- Collect HTTP request counts, latencies, and error codes from the FastAPI service
- Track model-specific metrics such as prediction counts
- Expose its own health metrics for self-monitoring
Alertmanager
Alertmanager handles alert notifications based on rules defined in alerts.yml. The system monitors:
- ApiTargetDown: Critical alert if the API becomes unreachable for over 1 minute
- HighErrorRate: Warning when 5xx errors exceed 5% of total requests over 5 minutes
- HighLatencyP95: Warning when the 95th percentile latency exceeds 0.5 seconds over 5 minutes
- PredictionTrafficZero: Informational alert when no predictions are recorded for 15 minutes
- PrometheusDown: Critical alert if Prometheus self-scraping fails for over 1 minute
Grafana
Grafana provides comprehensive visualization dashboards for real-time monitoring of Prometheus metrics collected from the FastAPI backend. Two custom dashboards follow observability best practices:
- ML API Performance Dashboard: Tracks Request Rate (RPS), Latency (P95/P99), Error Rates, and Prediction counts.
- System Health Dashboard: Monitors HTTP status codes, throughput, and in-progress requests.
Public access (no login)
This Space is configured to disable Grafana login entirely and expose dashboards in anonymous Viewer mode. This avoids browser-dependent cookie/session issues (e.g. login loops on some accounts).
Dashboards
- ML API Performance:
/d/ml-api-dashboard - System Health:
/d/system-health-dashboard
