Skip to content

Add Phase 0 trace query spans#299

Merged
thorrester merged 1 commit into
olap-serving-layerfrom
phase0/query-delta-spans
May 13, 2026
Merged

Add Phase 0 trace query spans#299
thorrester merged 1 commit into
olap-serving-layerfrom
phase0/query-delta-spans

Conversation

@thorrester
Copy link
Copy Markdown
Member

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_traces
  • get_trace_spans
  • trace_metrics
  • get_trace_spans_by_id
  • v1_otel_traces

The 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.rs scope.

scouter_refresh_on_request_path_total was not emitted because the assigned files do not expose a RefreshOrigin::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 on scouter-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 lints passed.
  • cargo test -p scouter-dataframe --all-features -- --nocapture --test-threads=1 passed after removing generated local Delta test storage from a previous interrupted run.
  • cargo test -p scouter-server --all-features trace -- --nocapture --test-threads=1 passed.

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.

@thorrester thorrester merged commit 94fa74c into olap-serving-layer May 13, 2026
7 checks passed
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (olap-serving-layer@7b19ab3). Learn more about missing BASE report.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

thorrester added a commit that referenced this pull request May 14, 2026
* Add phase 0 observability contract (#297)

* Add phase0 trace query spans (#299)

* Add object store observability wrapper (#298)

* Add tiered OLAP benchmark harness

* updating bench
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.

2 participants