Skip to content

Commit 80bc84e

Browse files
authored
feat: suggest --json in bt view trace text output (#179)
The non-JSON text output of `bt view trace` only hinted at `bt view span --id <row-id>` for full data, which requires N per-span calls. Agents running `bt view trace` to analyze a trace would either fan out N requests or pivot to the web UI's CSV export. Add a hint pointing at `--json` so the full trace payload is reachable in one copy-pasteable command, alongside the existing next-page hint. Fix #178
1 parent 96242fa commit 80bc84e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/traces.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4995,9 +4995,10 @@ fn print_trace_text(
49954995
);
49964996
}
49974997
println!(
4998-
"\nTrace output is truncated. Use `bt view span{} --object-ref {} --id <row-id>` for full span data.",
4998+
"\nTrace output is truncated. Re-run with --json for the full trace (`bt view trace --json{0} --object-ref {1} --trace-id {2}`), or fetch a single span with `bt view span{0} --object-ref {1} --id <row-id>`.",
49994999
profile_flag_suffix(profile),
5000-
object_ref
5000+
object_ref,
5001+
trace_id
50015002
);
50025003
if let Some(cursor) = next_cursor {
50035004
let limit_suffix = if limit != 50 {

0 commit comments

Comments
 (0)