feat(office_server): tracing spans on all RPC handlers #15

Merged
zaelgohary merged 1 commit from development_feat_office_server_tracing_spans into development 2026-04-27 10:11:34 +00:00
Member

Summary

Adds #[tracing::instrument] to all 8 RPC handlers in hero_office_server. Spans emit automatically — entry, exit, timing, and any errors — through the existing tracing pipeline. No new dependency.

Partial #14 (instrumentation). Lays the foundation; the /metrics Prometheus exporter remains the bigger half of #14, to be tackled when there is a real consumer.

Changes

  • crates/hero_office_server/src/lib.rs#[tracing::instrument(skip(state, params))] on the 8 handle_* functions

Test Results

  • cargo check -p hero_office_server
  • cargo clippy -p hero_office_server -- -D warnings

Manual verification

With RUST_LOG=info,hero_office_server=debug, every RPC call now produces a span line in the hero_office logs. Verified by curling the RPC and watching hero_proc logs tail hero_office_server.

## Summary Adds `#[tracing::instrument]` to all 8 RPC handlers in `hero_office_server`. Spans emit automatically — entry, exit, timing, and any errors — through the existing `tracing` pipeline. No new dependency. ## Related Issue Partial #14 (instrumentation). Lays the foundation; the `/metrics` Prometheus exporter remains the bigger half of #14, to be tackled when there is a real consumer. ## Changes - `crates/hero_office_server/src/lib.rs` — `#[tracing::instrument(skip(state, params))]` on the 8 `handle_*` functions ## Test Results - `cargo check -p hero_office_server` ✅ - `cargo clippy -p hero_office_server -- -D warnings` ✅ ## Manual verification With `RUST_LOG=info,hero_office_server=debug`, every RPC call now produces a span line in the hero_office logs. Verified by curling the RPC and watching `hero_proc logs tail hero_office_server`.
8 handlers (health, list_contexts, list_documents, create_editor_session,
get_document, save_document, upload_document, delete_document) now emit
tracing spans automatically — entry, exit, and timing show up in the
existing tracing pipeline at INFO level (RUST_LOG=info,hero_office_server=debug).

Foundation for #14. Future work: hook a metrics exporter onto these spans
so we can answer how many editor sessions per day, save-latency p95, etc.
zaelgohary merged commit fedc8f162b into development 2026-04-27 10:11:34 +00:00
zaelgohary deleted branch development_feat_office_server_tracing_spans 2026-04-27 10:11:34 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_office!15
No description provided.