feat(traces): compare two AgentCore traces from the CLI
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- aws, typescript
- Lĩnh vực
- cli, cloud, observability-sre
Hướng nghiên cứu
Bắt đầu với các lệnh hiện có agentcore traces list và agentcore traces get, các nguồn trace/span CloudWatch của chúng, các quy ước phân giải target và các thuộc tính span GenAI. Sau đó, sử dụng các phạm vi unit test được yêu cầu —lựa chọn root-span, thời điểm fallback, loại bỏ trùng lặp các span lồng nhau, tổng hợp token, các delta, cảnh báo và lỗi trace bị thiếu— làm định nghĩa hoàn tất, đồng thời duy trì hành vi hiện có của list/get.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
agentcore traces list finds traces and agentcore traces get exports raw
CloudWatch records, but there is no human-friendly way to compare two agent
invocations.
Users testing runtime versions or named endpoints must manually download JSON,
inspect CloudWatch’s incomplete single-span view, and calculate latency/token
differences themselves. This makes performance regression testing impractical.
Proposed command
agentcore traces compare <baseline-trace-id> <candidate-trace-id> \
--runtime <runtime-name> \
[--since <time>] \
[--until <time>] \
[--json]
The command should fetch both traces directly from the existing CloudWatch
trace/span sources. It must not require users to export JSON files first.
Example output:
Trace comparison: baseline abc123 → candidate def456
Metric Baseline Candidate Delta
End-to-end latency 10.00s 6.33s -3.66s (-36.6%)
LLM latency 7.36s 3.67s -3.69s (-50.1%)
Tool latency 2.26s 2.58s +0.32s (+14.3%)
LLM calls 2 2 0 (0.0%)
Tool calls 1 1 0 (0.0%)
Input tokens 151,266 2,848 -148,418 (-98.1%)
Output tokens 595 300 -295 (-49.6%)
Total tokens 151,861 3,148 -148,713 (-97.9%)
Baseline model(s): us.anthropic.claude-haiku-4-5-20251001-v1:0
Candidate model(s): us.anthropic.claude-haiku-4-5-20251001-v1:0
Required behavior
-
Resolve the runtime/project target using the existing traces command
conventions. -
Fetch structured span records from CloudWatch directly.
-
Use the POST /invocations server span for end-to-end latency when present.
If absent, fall back to earliest span start through latest span end and label
that fallback clearly. -
Report LLM and tool time separately using existing GenAI span attributes.
-
Avoid double-counting nested provider spans. For example, a Strands internal
LLM span and its nested Bedrock client span represent the same model call. -
Include LLM/tool call counts and input/output/total token counts when
available. -
Show absolute and percentage deltas; handle a zero baseline safely.
-
Provide stable machine-readable output with --json.
-
Fail clearly if either trace cannot be found or has no usable timed spans.
-
Do not claim a “critical path” calculation: CloudWatch trace parent/child
relationships may be incomplete. -
Show comparability warnings when observable characteristics differ, such as
LLM-call count, tool-call count, or token usage. The CLI cannot prove that
Scope
This is a trace-analysis and latency-comparison feature. It is independent of:
- runtime endpoint selection for agentcore invoke
- AgentCore Gateway A/B-test infrastructure
- SigNoz or other third-party OTEL observability backends
Acceptance Criteria
-
agentcore traces compare works for two trace IDs from the same runtime.
-
It produces the table above or equivalent concise terminal output.
-
--json returns documented structured data suitable for CI benchmarking.
-
Unit tests cover root-span selection, fallback timing, nested-span
de-duplication, token aggregation, deltas, warnings, and missing-trace
errors. -
Existing traces list and traces get behavior remains unchanged.
Additional Context
No response
- Ngôn ngữ chính
- TypeScript
- Star
- 291
- Fork
- 96
- Merge trung bình
- 20 giờ 50 phút
- Pull request đã merge (30 ngày)
- 214
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aws/agentcore-cli
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
aws/agentcore-cli#2395 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
aws/agentcore-cli#2392 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws/agentcore-cli#2267 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/agentcore-cli#2258 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/agentcore-cli#2176 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aws/agentcore-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
opengovsg/FormSG#10118 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa bug claude
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
linagora/twake-calendar-frontend#1434 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: MBC kr [Geo-blocked]Đang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
iptv-org/iptv#52824 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 78/100
jaegertracing/jaeger-ui#4512 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ide documentation enhancement platform:macos platform:vscode
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
anthropics/claude-code#97389 ·
Maintainer thường phản hồi trong vòng 1 ngày