Commit ccf3aae
committed
feat(log-list): add --trace flag to filter logs by trace ID (#317)
Add --trace flag to `sentry log list` that filters logs by a specific
trace ID. When provided, the command uses the dedicated trace-logs
endpoint (org-scoped) instead of the project-scoped events endpoint,
since the Explore/Events logs API does not support trace ID filtering
in query syntax.
Key changes:
- Add --trace flag with 32-char hex validation to log list command
- When --trace is given, only org resolution is needed (not org/project)
- Support --trace in both single-fetch and --follow streaming modes
- Trace follow mode filters by timestamp_precise for deduplication
- Refactor writeLogs to accept LogLike type (works with both SentryLog
and TraceLog) and includeTrace option
- Add trace-logs mock route for e2e testing
- Add 5 e2e tests covering: basic trace filter, JSON output, validation,
empty state, and help output
Closes #3171 parent c6f5be0 commit ccf3aae
3 files changed
+398
-26
lines changed
0 commit comments