Add fetch/conversion metrics and improve logging

FetchResult now includes:
- StatusCode: HTTP status from upstream
- FetchDurationMs: time to fetch from upstream
- RemoteAddr: upstream server address

SourceMetadata now stores:
- ContentLength: size from upstream
- FetchDurationMs: fetch timing
- RemoteAddr: for debugging

Image conversion log now includes:
- host: source hostname (was missing)
- path: source path (renamed from file)
- convert_ms: image processing time
- quality: requested quality setting
- fit: requested fit mode
This commit is contained in:
2026-01-08 12:34:26 -08:00
parent 4426387d1c
commit 15d9439e3d
5 changed files with 40 additions and 6 deletions

View File

@@ -178,6 +178,12 @@ type FetchResult struct {
ContentType string
// Headers contains all response headers from upstream
Headers map[string][]string
// StatusCode is the HTTP status code from upstream
StatusCode int
// FetchDurationMs is how long the fetch took in milliseconds
FetchDurationMs int64
// RemoteAddr is the IP:port of the upstream server
RemoteAddr string
}
// Processor handles image transformation (resize, format conversion)