Convert tracing calls to structured fields - #93
Merged
Conversation
Replaces formatted string log messages with structured tracing fields (e.g. `%value` / `?value`) across the workspace, making log output queryable and consistent with tracing's structured-logging model.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR converts tracing calls across the workspace from formatted-string messages to structured fields (e.g. %value, ?value, key = value), making logs more queryable and consistent with structured-logging conventions.
Changes:
- Replaced interpolated/format-string tracing calls with structured fields throughout server, client, catalog, data, and bench crates.
- Simplified/normalized log messages by removing redundant text where the field name already conveys meaning.
- Updated test/bench logging statements to use structured fields for easier filtering and correlation.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| server/tests/server.rs | Updates test tracing calls to log structured header/status/body fields. |
| server/src/replication.rs | Converts replication loop/config error logging to structured fields. |
| server/src/lib.rs | Logs reconciliation config as a structured debug field. |
| server/src/http.rs | Converts server “listening” and append logging to structured fields. |
| server/src/config.rs | Logs config TOML lines and formatting errors with structured fields. |
| data/src/segment/parquet.rs | Converts segment/parquet writer & recovery logs to structured fields. |
| data/src/segment/cache.rs | Converts cache writer/read logs to structured fields (rows, chunks, paths, errors). |
| data/src/segment/arrow.rs | Converts arrow segment recovery logs to structured fields. |
| data/src/segment.rs | Converts segment lifecycle logs (remove/truncate/iter/format detection) to structured fields. |
| client/src/replicate.rs | Converts replication job lifecycle and retry/error logging to structured fields. |
| client/src/lib.rs | Converts client warnings/debug logs (batch sizing, responses) to structured fields. |
| client/src/batch.rs | Converts batch sizing/queueing error logs to structured fields. |
| catalog/src/topic.rs | Logs partition map via a structured debug field. |
| catalog/src/storage.rs | Logs storage monitor startup with structured root/mount_point fields. |
| catalog/src/slog.rs | Converts slog compaction/checkpoint/thread logs to structured fields. |
| catalog/src/reconcile.rs | Converts reconcile loop/topic/partition/segment logging to structured fields. |
| catalog/src/partition.rs | Converts partition commit/retention/rolling logs to structured fields. |
| catalog/src/manifest.rs | Converts manifest migration/update/remove logging to structured fields. |
| catalog/src/catalog.rs | Converts catalog migration/checkpoint/retention/open/close logging to structured fields. |
| bench/src/write.rs | Converts bench writer traces to structured fields. |
| bench/src/load.rs | Converts bench load test traces/debug to structured fields. |
| bench/src/lib.rs | Converts bench runtime status/stats logging to structured fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address review comment on PR #93: the message referred to Arrow segment parts as "parquet parts", which is incorrect since parquet handling lives in a separate module.
String, &str, and numeric primitives implement tracing::field::Value directly and don't need Display formatting via %. Keep % only for types that require it (ByteSize, PartitionId, SegmentId, SocketAddr, Path::Display, error types, etc).
Dropping % sigils shortened several tracing! call lines, requiring rustfmt to reflow them.
These three error!() sites logged anyhow/thiserror errors with {:?}
(Debug) before the tracing conversion, which shows the full cause
chain and enum variant detail. The conversion had switched them to
%e (Display), silently dropping that detail from production logs.
AnIrishDuck
approved these changes
Jul 20, 2026
imp
added a commit
that referenced
this pull request
Jul 20, 2026
Address review comment on PR #93: the message referred to Arrow segment parts as "parquet parts", which is incorrect since parquet handling lives in a separate module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
trace!("...", value)) with structured tracing fields (%value/?value/key = value) across the workspace, making log output queryable and consistent with tracing's structured-logging model.debug!(%seed, "seed")->debug!(%seed)).Test plan
cargo clippy --workspace --all-targetspasses cleancargo check --workspacepasses