Skip to content

[feat][trace] support trace table sharding by workspace - #636

Open
cuichen01 wants to merge 3 commits into
mainfrom
feat/trace-shard
Open

[feat][trace] support trace table sharding by workspace#636
cuichen01 wants to merge 3 commits into
mainfrom
feat/trace-shard

Conversation

@cuichen01

Copy link
Copy Markdown
Collaborator
  • Add SupportShard/ShardList to TableCfg for per-TTL shard configuration
  • Add TenantShardConfig type and GetTenantShardConfig interface method
  • Read path: expand shard tables in getQueryTenantTables (full double-read)
  • Write path: route InsertSpans/InsertAnnotations to correct shard by workspace
  • Group exporter writes by (TTL, WorkspaceID) pair

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

- Add SupportShard/ShardList to TableCfg for per-TTL shard configuration
- Add TenantShardConfig type and GetTenantShardConfig interface method
- Read path: expand shard tables in getQueryTenantTables (full double-read)
- Write path: route InsertSpans/InsertAnnotations to correct shard by workspace
- Group exporter writes by (TTL, WorkspaceID) pair
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 45.45455% with 36 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/modules/observability/infra/repo/trace.go 34.04% 29 Missing and 2 partials ⚠️
...ackend/modules/observability/infra/config/trace.go 0.00% 5 Missing ⚠️

❌ Your patch check has failed because the patch coverage (45.45%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #636   +/-   ##
=======================================
  Coverage        ?   78.41%           
=======================================
  Files           ?      694           
  Lines           ?    85522           
  Branches        ?        0           
=======================================
  Hits            ?    67065           
  Misses          ?    14529           
  Partials        ?     3928           
Flag Coverage Δ
unittests 78.41% <45.45%> (?)

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 39.28% <ø> (ø)
...exporter/clickhouseexporter/clickhouse_exporter.go 100.00% <100.00%> (ø)
...ackend/modules/observability/infra/config/trace.go 63.27% <0.00%> (ø)
backend/modules/observability/infra/repo/trace.go 82.17% <34.04%> (ø)

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 c4d0967...405f343. 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.

Eliminate separate tenant_shard_config TCC key. Space-to-shard mapping
now lives in TableCfg.ShardConfig alongside the table definition,
reducing config lookups and simplifying the architecture.
Enable downstream implementations to perform shard-aware table
filtering based on query time range.
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.

1 participant