feat(traces): compare two AgentCore traces from the CLI
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- aws, typescript
- 領域
- cli, cloud, observability-sre
調査の方向性
既存の agentcore traces list および agentcore traces get コマンド、それらの CloudWatch の trace/span ソース、ターゲット解決の規約、GenAI span 属性から始めます。次に、要求されたユニットテスト領域—root-span の選択、フォールバックのタイミング、ネストされた span の重複排除、トークン集計、差分、警告、トレース欠落エラー—を完了の定義として使用し、既存の list/get の動作を維持します。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 291
- フォーク
- 96
- 平均マージ
- 20時間 50分
- マージ済み PR(30日)
- 214
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/agentcore-cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
aws/agentcore-cli#2395 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
aws/agentcore-cli#2392 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aws/agentcore-cli#2267 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/agentcore-cli#2258 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/agentcore-cli#2176 ·
メンテナーはふだん 1 日以内に返信
aws/agentcore-cli の issue をすべて見る
似ている issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
StabilityNexus/Fate-EVM-Frontend#153 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
code-yeongyu/oh-my-openagent#9039 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Tencent/teamai-cli#862 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue hacktoberfest redis
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
libredb/libredb-studio#1164 ·
メンテナーはふだん 1 日以内に返信
-
flake
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信