@tsuga/cli 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +16 -1
  2. package/dist/cli.js +68 -68
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -316,6 +316,21 @@ Aggregates groups of similar spans into synthetic summary spans (marked with
316
316
  tsuga traces summarize --trace-id 78c99c5bb1e4a30297fa134b9dbec64f --from -30m
317
317
  ```
318
318
 
319
+ ### Trace latency summary
320
+
321
+ Summarizes where wall-clock time is spent in a trace: each slice of the timeline
322
+ is attributed to the services with active leaf spans, with per-service totals:
323
+
324
+ ```bash
325
+ tsuga traces latency-summary --trace-id 78c99c5bb1e4a30297fa134b9dbec64f --from -30m
326
+
327
+ # Per-service totals only, without the range timeline
328
+ tsuga traces latency-summary --trace-id 78c99c5bb1e4a30297fa134b9dbec64f --from -30m --no-ranges
329
+
330
+ # Collapse timeline ranges shorter than 50ms (0 disables collapsing)
331
+ tsuga traces latency-summary --trace-id 78c99c5bb1e4a30297fa134b9dbec64f --from -30m --min-range-duration-ms 50
332
+ ```
333
+
319
334
  ### Metrics
320
335
 
321
336
  ```bash
@@ -369,7 +384,7 @@ tsuga experimental promql -f query.json
369
384
  Or inline:
370
385
 
371
386
  ```bash
372
- tsuga experimental promql -d '{"query":"sum(rate(http_requests_total[5m]))","timeRange":{"from":1704067200,"to":1704070800},"step":"30s"}'
387
+ tsuga experimental promql -d '{"query":"sum by (\"context.service.name\") (sum_over_time({\"traces.span.metrics.calls\", \"span.kind\"=\"SPAN_KIND_SERVER\"}[5m]))","timeRange":{"from":1704067200,"to":1704070800},"step":"30s"}'
373
388
  ```
374
389
 
375
390
  `timeRange.from` / `timeRange.to` are Unix timestamps in seconds.