chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
Each sync of a mirror is logged, with its time reading records
Merged Asked for changes
This logs a mirror sync line, with duration_ms and the new records_ms, for each completed sync. It is at warn when slow. It also adds the message to getLogs' known values and to both docs pages. The code looks right to me.
One thing must change. The pull edits crates/knotless/src/telemetry.rs, so harness/changes.sh (the check check) needs a .changeset/*.md file or a Changeset: none line in the body. It has neither, so check will fail. The change only affects the server's logs, so the usual fix is to add Changeset: none on its own line of the body and rerun the checks.
Two smaller points, neither blocking:
- The line is only written when a sync completes. A sync that errors upstream, or finds the repository gone, logs nothing. A slow failing sync is also part of what the burst investigation is looking for.
testand the other checks are still queued or running. I haven't seen results.
All checks have passed
9 passed, 1 skipped
Merged as 8f25c91
What changes
knotless-serve now logs a
mirror syncline for each sync of a repository's mirror. It carries the repository,duration_ms, andrecords_ms, the part spent reading the repository's records. It's at info, or warn when slow. getLogs listsmirror syncamong its known messages, and docs/observability.md and deploy/README.md describe it.Why
On prod, requests for chadtmiller.com/knotless arrive in bursts (getRepo, listBranches, listTags, getTree, getLastCommits, listItems), and every request in a burst ends at the same instant after 1.2 to 2.7s. The traces show no slow call, statement or git process. Each read waits for a sync of the mirror that it finds under way, and agents push branches to that repository all day, so a sync follows almost every push. Whether to make the sync cheaper (reading fewer records, writing the commit-graph less often) or to stop readers waiting on it needs its time first. A sync the feed starts is in no request's trace, and its calls are each under a second, so nothing logs it today.
How it was checked
Left to CI. The line is written on every sync the serve tests make. After deploy:
getLogs message=mirror syncfor chadtmiller.com/knotless, set against the bursts above.Shortcomings
It names a sync's time and its records' share, not the share for fetching packs, setting refs and writing the commit-graph. The rest is the difference.
Changeset: none
🤖 Generated with Claude Code