Reading — step 1 of 5
Read
~1 min readProduction Features
Access Logs & Metrics
Two pieces of observability every server needs:
Access log — one line per request:
192.168.1.5 - - [17/Mar/2025:09:15:23 +0000] "GET /api/users HTTP/1.1" 200 482 "-" "curl/8.5.0" 23ms
This is the Common Log Format (Apache) extended with response time and user agent. Tools like AWStats, GoAccess, Splunk parse it for free.
Fields:
| Field | Example |
|---|---|
| Remote IP | 192.168.1.5 |
| Identity | - (deprecated) |
| User | - (basic auth username) |
| Timestamp | [17/Mar/2025:09:15:23 +0000] |
| Request | "GET /api/users HTTP/1.1" |
| Status | 200 |
| Bytes sent | 482 |
| Referer | "-" (or page URL) |
| User-Agent | "curl/8.5.0" |
| Latency | 23ms |
Metrics (Prometheus / OpenTelemetry):
http_requests_total{method, status, route}— counterhttp_request_duration_seconds_bucket{...}— histogramhttp_request_size_bytes/http_response_size_bytes— summary
Aggregating these into dashboards is what tells you "p99 of /api/users got slow" before users complain.
Discussion
Ask a question, share an insight, or help someone who’s stuck.
Sign in to post a comment or reply.
Loading…