Skip to content

Show trace labels and filter traces by label - #363

Merged
dipeshbabu merged 1 commit into
mainfrom
feat/trace-labels
Nov 20, 2026
Merged

dipeshbabu merged 1 commit into
mainfrom
feat/trace-labels

Conversation

@dipeshbabu

Copy link
Copy Markdown
Owner

Follow-up to #362: CI uploads carry labels (`condition`, `commit`, `ref`, ...) under `metadata.labels`, but nothing showed or searched them.

  • Store (SQLite `json_extract`, Postgres JSONB): `list_traces_page` returns `labels` per trace and accepts `label=(key, value)`; keys must match `[A-Za-z0-9][A-Za-z0-9_.-]{0,63}` and are passed as parameters (dotted keys work); cursors stay valid under the filter. `parse_label_filter("KEY=VALUE")` is shared by API, CLI, dashboard and `agentloop upload`.
  • API: `GET /v1/traces?label=KEY=VALUE` (422 when malformed); a label always uses the paginated listing.
  • Client: `list_traces(label=...)`. CLI: `list-stored-traces --label` plus a Labels column when present.
  • Dashboard: Traces page has a "Filter by label" box (errors shown inline) and a readable labels column.

Tests: store contract (both backends in CI) incl. dotted keys, project isolation and filtered pagination; API, CLI and dashboard. 227 related tests pass locally. Docs: CI, DASHBOARD, API_VERSIONING, changelog.

🤖 Generated with Claude Code

CI uploads now carry labels such as commit and condition, but nothing
displayed or searched them. Paginated trace listings in SQLite and
Postgres return each trace's metadata.labels and accept a KEY=VALUE
label filter (validated, parameterised, cursor-stable). The filter is
exposed as GET /v1/traces?label=, AgentLoopClient.list_traces(label=),
agentloop list-stored-traces --label (with a Labels column), and a
filter box with a labels column on the dashboard Traces page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown

AgentLoop replay self-test

This required repository check evaluates generated synthetic demo traces. It tests the replay and CI machinery; it does not show that this PR improves application performance.

AgentLoop CI Report

  • Status: passed
  • Replay: Replay passed: latency improvement 69.67%, cost improvement 78.82%, retry delta -1.
  • Merge recommendation: synthetic self-test only; assess application traces before merge
  • Findings: 1 total, 0 high severity, 1 patchable

Performance Gates

Gate Status Detail
latency_regression pass 0.00% regression <= 0.00% allowed
cost_regression pass 0.00% regression <= 0.00% allowed
latency_improvement pass 69.67% improvement >= 20.00% required
cost_improvement pass 78.82% improvement >= 5.00% required
retry_non_increase pass 0 candidate retries <= 1 baseline retries

Trace inputs

This comparison includes synthetic data. It does not establish application performance gains from a pull request.

Side Run ID Path Synthetic marker Source
baseline run_767853562db94f13 runs/research_agent_baseline.json yes agentloop_demo
candidate run_50b2eef19ade4a99 runs/research_agent_optimized.json yes agentloop_demo

Metric Impact

Metric Impact
Latency improvement 69.67%
Cost improvement 78.82%
Retry delta -1
Candidate schema validity not provided
Candidate quality score not provided

Top Findings

Finding Severity Type Rewrite
al_cache_context_32924f99b44e: Cache repeated prompt/context prefix medium cache_context Move stable instructions into cached prefixes, summaries, or framework-level memory instead of resending full text.

@dipeshbabu
dipeshbabu merged commit b77ce5e into main Nov 20, 2026
27 checks passed
@dipeshbabu
dipeshbabu deleted the feat/trace-labels branch November 20, 2026 08:27
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