Skip to content

[feat][trace] optimize ListTrajectoryOApi to single CK query - #669

Merged
cuichen01 merged 2 commits into
mainfrom
feat/optimize-trajectory-single-ck-query
Sep 17, 2026
Merged

cuichen01 merged 2 commits into
mainfrom
feat/optimize-trajectory-single-ck-query

Conversation

@cuichen01

Copy link
Copy Markdown
Collaborator

… switch

Reduce two ClickHouse reads in GetTrajectories to one by fetching all spans with full columns in a single query, then filtering in memory. Controlled by enable_single_query flag in trajectory_metadata_config, default off to preserve original behavior.

What type of PR is this?

Check the PR title

  • This PR title match the format: [<type>][<scope>] <description>. For example: [fix][backend] flaky fix
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Add documentation if the current PR requires user awareness at the usage level.
  • This PR is written in English. PRs not in English will not be reviewed.

(Optional) Translate the PR title into Chinese

(Optional) More detailed description for this PR(en: English/zh: Chinese)

en:
zh(optional):

(Optional) Which issue(s) this PR fixes

… switch

Reduce two ClickHouse reads in GetTrajectories to one by fetching all
spans with full columns in a single query, then filtering in memory.
Controlled by enable_single_query flag in trajectory_metadata_config,
default off to preserve original behavior.
@codecov

codecov Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.51020% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...bservability/domain/trace/service/trace_service.go 73.33% 8 Missing and 4 partials ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #669      +/-   ##
==========================================
- Coverage   78.82%   78.82%   -0.01%     
==========================================
  Files         707      707              
  Lines       87823    87872      +49     
==========================================
+ Hits        69227    69264      +37     
- Misses      14607    14615       +8     
- Partials     3989     3993       +4     
Flag Coverage Δ
unittests 78.82% <75.51%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...es/observability/domain/component/config/config.go 46.87% <100.00%> (+7.58%) ⬆️
...bservability/domain/trace/service/trace_service.go 89.56% <73.33%> (-0.36%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b699d63...cbbe21f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

fankuo
fankuo previously approved these changes Sep 17, 2026
kidkidkid
kidkidkid previously approved these changes Sep 17, 2026
@cuichen01
cuichen01 dismissed stale reviews from kidkidkid and fankuo via 25d527c September 17, 2026 07:12
@cuichen01
cuichen01 merged commit 5014013 into main Sep 17, 2026
10 checks passed
@cuichen01
cuichen01 deleted the feat/optimize-trajectory-single-ck-query branch September 17, 2026 07:41
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.

4 participants