Overview
Health and metrics endpoints provide service status information, deployment details, and runtime performance data for monitoring and verification.GET /health
Retrieve service health status and deployment information.Request
Response
Service health status. Always returns
"healthy" when responding.Full Git commit hash of the currently deployed version
Build timestamp of the deployed binary (ISO 8601 format or āunknownā if not set)
GitHub repository URL where the source code is hosted
Indicates deployment on Leapcell platform. Always
true for the official instance.Go runtime version used to compile the binary (e.g.,
go1.21.5)Response Example
Use Cases
Uptime Monitoring
Healthcheck Script
Deployment Verification
Verify Deployment
CI/CD Integration
GitHub Actions
GET /metrics
Retrieve runtime performance metrics.Request
Response
Memory usage statistics from Go runtime
Bytes of allocated heap objects (currently in use)
Cumulative bytes allocated for heap objects (lifetime total)
Total bytes of memory obtained from the OS
Number of completed garbage collection cycles
Number of currently active goroutines
Service uptime since last restart (human-readable duration, e.g., ā4h23m15sā)
Response Example
Metric Interpretation
| Metric | Meaning | Healthy Range |
|---|---|---|
memory.alloc | Current heap usage | < 500 MB typical |
memory.sys | Total OS memory | < 1 GB typical |
goroutines | Concurrent operations | 10-100 normal |
uptime | Time since restart | Higher = stable |
Use Cases
Performance Monitoring
Monitor Memory Growth
Alert on High Goroutine Count
Goroutine Monitor
GET /api/status
Retrieve current service operational status (used by frontend).Request
Response
Indicates if the service is currently suspended. When
true, all push operations are rejected.Response Example
Normal Operation
Service Suspended
Usage
The frontend polls this endpoint to display service status banners. When panic mode is active:- All Git push operations are rejected with an explanatory message
- The website shows a prominent suspension notice
- The deployed badge changes to red
Security Notes
Exposed Information
All health endpoints expose only public information:- Git commit hashes (public on GitHub)
- Build timestamps (non-sensitive)
- Memory/runtime stats (non-sensitive)
- Service status (public)
No Sensitive Data
These endpoints never expose:- Environment variables
- API tokens or secrets
- Database credentials
- User data or IP addresses
- Internal configuration
No Authentication Required
Health and metrics endpoints are intentionally public for:- Uptime monitoring services
- Transparency and verification
- Operational observability
- Trust building through openness
Implementation Reference
Source:internal/http/handlers.go
HealthHandler(lines 493-506)MetricsHandler(lines 508-522)ServiceStatusHandler(lines 817-822)SetBuildInfo(lines 531-535)- Build info variables (lines 524-528)
- Runtime tracking (lines 537-538)
internal/http/router.go (lines 140-141, 215)