Add Phase 0 trace query spans#299
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## olap-serving-layer #299 +/- ##
=====================================================
Coverage ? 76.57%
=====================================================
Files ? 26
Lines ? 918
Branches ? 0
=====================================================
Hits ? 703
Misses ? 215
Partials ? 0 🚀 New features to boost your workflow:
|
thorrester
added a commit
that referenced
this pull request
May 14, 2026
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.
Pull Request
Short Summary
Adds Phase 0 trace-query observability spans for the in-scope Delta-backed trace handlers and query paths.
Context
This PR depends on the Phase 0 observability contract merged in #297. It instruments the five assigned trace handlers only:
paginated_tracesget_trace_spanstrace_metricsget_trace_spans_by_idv1_otel_tracesThe change adds documented
#[tracing::instrument]fields for trace query metadata, plus nested spans for table resolution, logical planning, physical planning, collection, Arrow conversion, trace tree build, and response serialization where those stages are available in the assigned scope.The Delta trace engine now emits lifecycle spans for table load, snapshot refresh, catalog swap, optimize, and incremental update paths inside the assigned
engine.rsscope.scouter_refresh_on_request_path_totalwas not emitted because the assigned files do not expose aRefreshOrigin::Request-style origin signal. I did not add a broader counter without that exact origin.The Phase 0 contract constants exist under
scouter_tracing::tracer::phase0_observability, but the in-scope crates do not depend onscouter-tracing, and Cargo manifests were outside this task's write scope. To keep the implementation scoped, the contract names are mirrored locally in the touched modules.Verification run from
/tmp/scouter-phase0-query-delta-spans:make lintspassed.cargo test -p scouter-dataframe --all-features -- --nocapture --test-threads=1passed after removing generated local Delta test storage from a previous interrupted run.cargo test -p scouter-server --all-features trace -- --nocapture --test-threads=1passed.Python verification was skipped because this change does not alter PyO3-exposed types or Python behavior.
Is this a Breaking Change?
No. This adds observability instrumentation only and does not change public API contracts, storage schemas, or Python behavior.