Skip to main content

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

string
required
Service health status. Always returns "healthy" when responding.
string
required
Full Git commit hash of the currently deployed version
string
required
Build timestamp of the deployed binary (ISO 8601 format or “unknown” if not set)
string
required
GitHub repository URL where the source code is hosted
boolean
required
Indicates deployment on Leapcell platform. Always true for the official instance.
string
required
Go runtime version used to compile the binary (e.g., go1.21.5)
object
required
Verification links for auditing the deployed code
string
Direct link to the commit on GitHub
string
Verification notice indicating full auditability

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

object
required
Memory usage statistics from Go runtime
integer
Bytes of allocated heap objects (currently in use)
integer
Cumulative bytes allocated for heap objects (lifetime total)
integer
Total bytes of memory obtained from the OS
integer
Number of completed garbage collection cycles
integer
required
Number of currently active goroutines
string
required
Service uptime since last restart (human-readable duration, e.g., “4h23m15s”)

Response Example

Metric Interpretation

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

boolean
required
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
See Moderation for panic mode control.

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)
Router configuration: internal/http/router.go (lines 140-141, 215)