Skip to content

fix(server): install telemetry as the FIRST step of boot, not the last - #419

Merged
jrosskopf merged 1 commit into
mainfrom
fix-telemetry-init-before-boot
Aug 16, 2026
Merged

fix(server): install telemetry as the FIRST step of boot, not the last#419
jrosskopf merged 1 commit into
mainfrom
fix-telemetry-init-before-boot

Conversation

@jrosskopf

@jrosskopf jrosskopf commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Problem

Telemetry used to install inside serve(), which EscurelConfig::build() calls only after doing all the real boot work (LaneStore, embedder, DuckLake attach, the writer lease, #563's lake adoption). Every log line from that entire sequence was silently dropped — no subscriber existed yet to capture it.

Found chasing exactly that: #563's new "writer boot: adopted existing lake content before serving" log never appeared on lab despite other, independent evidence (the periodic publish task's dirty-check correctly skipping its first tick) proving the adoption code was genuinely running. Confirmed via git show <deployed-sha> that the log statement really was in the shipped binary — this was a boot-ordering gap, not a bug in #563's fix itself.

Fix

install_telemetry now takes just a version string (all it ever read off ServerConfig) and EscurelConfig::build calls it as literally its first statement, before anything else. The resulting guard threads through to serve(), which now accepts an already-installed guard instead of always installing its own — falling back to installing one itself (None → install) for a caller that reaches serve() without going through build(), preserving existing behaviour there. Updated the one such caller (escurel-test-support's process harness, which constructs ServerConfig directly) to pass None explicitly.

No functional change to anything build() does — same steps, same order — only when logging becomes possible relative to them.

Testing

Full suite: escurel-index 224/224, escurel-server 444/444 — no regressions, including telemetry_filter.rs (whose EscurelProcess harness bypasses build() and now exercises the new None-fallback path). cargo clippy --all-targets -- -D warnings and cargo fmt --check both clean across the workspace.

Plan after merge: deploy to lab and confirm the #563 adoption log line (and everything else from early boot) finally shows up in a real pod's logs.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Telemetry used to install inside serve(), which build() calls only
after doing all the real boot work (LaneStore, embedder, DuckLake
attach, the writer lease, #563's lake adoption). Every log line from
that entire sequence was silently dropped — no subscriber existed yet
to capture it.

Found chasing exactly that: #563's new "writer boot: adopted existing
lake content before serving" log never appeared on lab despite other,
independent evidence (the periodic publish task's dirty-check
correctly skipping its first tick) proving the adoption code was
genuinely running. Confirmed via `git show <deployed-sha>` that the
log statement really was in the shipped binary — this was a boot-
ordering gap, not a bug in #563's fix itself.

install_telemetry now takes just a version string (all it ever read
off ServerConfig) and EscurelConfig::build calls it as literally its
first statement, before anything else. The resulting guard threads
through to serve(), which now accepts an already-installed guard
instead of always installing its own — falling back to installing one
itself (`None` → install) for a caller that reaches serve() without
going through build(), preserving existing behaviour there. Updated
the one such caller (escurel-test-support's process harness, which
constructs ServerConfig directly) to pass None explicitly.

No functional change to anything build() does — same steps, same
order — only WHEN logging becomes possible relative to them.

Full suite: escurel-index 224/224, escurel-server 444/444 (no
regressions — including telemetry_filter.rs, whose EscurelProcess
harness bypasses build() and exercises the new None-fallback path).
clippy -D warnings and fmt --check both clean across the workspace.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jrosskopf
jrosskopf merged commit 34a5f67 into main Aug 16, 2026
4 checks passed
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