You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(git): instrument readiness-gate prewarm with metrics
Adds per-repo duration histogram (cachew.git.prewarm_repo_duration_seconds,
labelled by path=fetch|restore and status=success|error), total-pass duration
histogram (cachew.git.prewarm_pass_duration_seconds), and pass-completion
counter (cachew.git.prewarm_passes_total), both labelled by outcome
(complete|empty_histogram|no_store).
Lets us see prewarm tail latency per deploy and distinguish 'no top-N'
configs from genuinely-warm pods on the dashboard.
Amp-Thread-ID: https://ampcode.com/threads/T-019e4193-0c35-732e-96f0-b9c97aed2fae
Co-authored-by: Amp <amp@ampcode.com>
operationTotal: metrics.NewMetric[metric.Int64Counter](meter, "cachew.git.operations_total", "{operations}", "Total number of git operations"),
30
+
requestTotal: metrics.NewMetric[metric.Int64Counter](meter, "cachew.git.requests_total", "{requests}", "Total number of git HTTP requests by type"),
31
+
snapshotServeTotal: metrics.NewMetric[metric.Int64Counter](meter, "cachew.git.snapshot_serves_total", "{serves}", "Snapshot serve events by source (cache, spool, cold_cache) and repository"),
32
+
snapshotServeSize: metrics.NewMetric[metric.Float64Histogram](meter, "cachew.git.snapshot_serve_bytes", "By", "Size of served snapshots in bytes"),
33
+
prewarmRepoDuration: metrics.NewMetric[metric.Float64Histogram](meter, "cachew.git.prewarm_repo_duration_seconds", "s", "Duration of per-repo prewarm during readiness gate, by entry state and status"),
34
+
prewarmPassDuration: metrics.NewMetric[metric.Float64Histogram](meter, "cachew.git.prewarm_pass_duration_seconds", "s", "Total duration of the readiness-gate prewarm pass, by outcome"),
0 commit comments