Skip to content

Sync from docs: add sync latency diagnosis guidance (powersync-docs #420)#31

Open
bean1352 wants to merge 1 commit into
mainfrom
drift/docs-420-diagnosing-sync-latency
Open

Sync from docs: add sync latency diagnosis guidance (powersync-docs #420)#31
bean1352 wants to merge 1 commit into
mainfrom
drift/docs-420-diagnosing-sync-latency

Conversation

@bean1352
Copy link
Copy Markdown
Collaborator

Generated by Claude. Review carefully before merging.

Source docs PR: powersync-ja/powersync-docs#420

What changed in docs: Added a "Diagnosing Sync Latency" section to debugging/troubleshooting.mdx covering a two-stage pipeline framework, timestamp-based end-to-end measurement, and common causes. Added a "Correlating Sync Sessions" subsection to maintenance-ops/monitoring-and-alerting.mdx documenting the Sync stream started and Sync stream complete log events and their full field schemas.

Skill updates in this PR:

  • skills/powersync/references/powersync-debug.md — added a new ## Diagnosing Sync Latency section covering:
    • The two-stage downstream pipeline (source DB → PowerSync Service → client) and scope boundary (upstream path is outside PowerSync)
    • Timestamp-based end-to-end measurement technique (updated_at = NOW() on write, compare to client arrival time)
    • Stage 1 diagnostic: Replication Lag chart + Replicator logs in the PowerSync Dashboard, with a pointer to the new /maintenance-ops/replication-lag docs page
    • Stage 2 diagnostic: Sync stream started and Sync stream complete log event field schemas (full field lists), rid-based session matching, and user_id filtering
    • Common causes checklist: large initial sync, upload queue blocking downloads, replication lag, too many buckets per user

Notes for reviewer:

  • The powersync-service.md file was intentionally left untouched. That file covers configuration rather than observability, and the log event field schemas are more useful in a debugging context where agents already have powersync-debug.md loaded.
  • The docs PR also links to a new /maintenance-ops/replication-lag page (source-specific replication lag guidance). This page is not yet represented by a skill file. The existing powersync-debug.md already references this URL in the new section and in the existing "Replication Lag Debugging (Postgres)" section. If and when that page ships in a separate docs PR, a reviewer may want to assess whether deeper coverage warrants additions to powersync-debug.md or a new reference file.
  • The # Replication Lag Debugging (Postgres) section in the existing file uses an H1 heading inconsistently with the rest of the file (which uses H2). This PR does not fix that — it's pre-existing and out of scope.

Generated by Claude Code

Mirrors the new "Diagnosing Sync Latency" section added to
debugging/troubleshooting.mdx and the "Correlating Sync Sessions"
subsection added to maintenance-ops/monitoring-and-alerting.mdx in
powersync-docs PR #420.

- Documents the two-stage downstream pipeline framework (source DB →
  PowerSync Service → client) and the timestamp-based end-to-end
  measurement technique
- Adds Stage 1 and Stage 2 sub-sections with per-stage diagnostic steps
- Documents the full field schemas for Sync stream started and Sync
  stream complete log events, including rid-based session matching
- Adds a Common Causes checklist covering large initial sync, upload
  queue blocking, replication lag, and too many buckets

Source: powersync-ja/powersync-docs#420
@bean1352 bean1352 requested a review from michaelbarnes May 15, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant