Skip to content

[feat][trace] input/output configurable preview & agent metadata discovery - #492

Merged
fanhua-bytedance merged 20 commits into
mainfrom
feat/trace_preview
May 21, 2026
Merged

[feat][trace] input/output configurable preview & agent metadata discovery#492
fanhua-bytedance merged 20 commits into
mainfrom
feat/trace_preview

Conversation

@fanhua-bytedance

Copy link
Copy Markdown
Collaborator

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

@CLAassistant

CLAassistant commented Apr 15, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@mocayo mocayo changed the title [Feat]trace input/output configurable preview & agent metadata discovery [feat][trace] input/output configurable preview & agent metadata discovery Apr 15, 2026
@codecov

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.43478% with 63 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...dler/coze/loop/apis/observability_trace_service.go 0.00% 24 Missing ⚠️
backend/modules/observability/application/trace.go 80.24% 15 Missing and 1 partial ⚠️
backend/pkg/json/ojg.go 42.85% 4 Missing and 4 partials ⚠️
...bservability/domain/trace/service/trace_service.go 91.66% 3 Missing and 3 partials ⚠️
...ility/domain/trace/entity/column_extract_config.go 90.00% 2 Missing and 2 partials ⚠️
...ace/service/trace/span_processor/clip_processor.go 88.46% 1 Missing and 2 partials ⚠️
.../observability/infra/repo/column_extract_config.go 95.34% 1 Missing and 1 partial ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #492      +/-   ##
==========================================
+ Coverage   77.26%   77.29%   +0.03%     
==========================================
  Files         654      657       +3     
  Lines       73514    73817     +303     
==========================================
+ Hits        56803    57060     +257     
- Misses      13333    13364      +31     
- Partials     3378     3393      +15     
Flag Coverage Δ
unittests 77.29% <80.43%> (+0.03%) ⬆️

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

Files with missing lines Coverage Δ
...plication/convertor/trace/column_extract_config.go 100.00% <100.00%> (ø)
.../observability/infra/repo/column_extract_config.go 95.34% <95.34%> (ø)
...ace/service/trace/span_processor/clip_processor.go 90.72% <88.46%> (-1.59%) ⬇️
...ility/domain/trace/entity/column_extract_config.go 90.00% <90.00%> (ø)
...bservability/domain/trace/service/trace_service.go 89.04% <91.66%> (+0.10%) ⬆️
backend/pkg/json/ojg.go 91.32% <42.85%> (-4.27%) ⬇️
backend/modules/observability/application/trace.go 77.73% <80.24%> (+1.13%) ⬆️
...dler/coze/loop/apis/observability_trace_service.go 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bad50fa...a4fd74e. 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.

@fanhua-bytedance
fanhua-bytedance force-pushed the feat/trace_preview branch 2 times, most recently from 129e512 to bb67520 Compare April 16, 2026 07:45
Comment thread backend/bin/golangci-lint Outdated
Comment thread backend/modules/observability/domain/trace/repo/trace.go Outdated
Comment thread backend/modules/observability/domain/trace/service/trace_service.go Outdated
Comment thread backend/modules/observability/domain/trace/service/trace_service.go Outdated
Comment thread backend/modules/observability/domain/trace/service/trace_service.go
Comment thread backend/modules/observability/domain/trace/service/trace_service.go Outdated
Comment thread backend/modules/observability/infra/repo/trace.go Outdated
@fanhua-bytedance
fanhua-bytedance force-pushed the feat/trace_preview branch 7 times, most recently from c2c4da4 to 02ea69d Compare April 22, 2026 03:30
Comment thread backend/modules/observability/domain/trace/service/trace_service.go
@fanhua-bytedance
fanhua-bytedance force-pushed the feat/trace_preview branch 2 times, most recently from bb1534c to f4f75ea Compare April 22, 2026 04:21
Comment thread backend/modules/observability/domain/trace/entity/column_extract_config.go Outdated
- Move SelectBest/Extract/configScore logic from clip_processor to entity layer
- Use workspace_id=0 for global default configs with wildcard '*' matching
- Add 4-bit scoring strategy (workspace > agent > spanListType > platformType)
- Simplify ClipProcessor.Transform to delegate to entity layer
- Add DB error logging consistent with other processors
- Seed 3 default extract configs via init SQL with fixed IDs for idempotency
- Add comprehensive tests for SelectBest, configScore, Extract
…te default configs

- Rewrite SelectBest to use two-phase direct matching instead of bit-score approach
- Reduce default column extract configs from 3 to 2: (0,*,llm_span) and (0,prompt,root_span)
- Change span_list_type SQL query from wildcard IN to exact match
- Update tests with 20 cases for 100% SelectBest coverage
@fanhua-bytedance
fanhua-bytedance merged commit ce152ed into main May 21, 2026
18 checks passed
@fanhua-bytedance
fanhua-bytedance deleted the feat/trace_preview branch May 21, 2026 07:17
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