@tsuga/cli 1.35.0 → 1.37.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 +70 -1
  2. package/dist/cli.js +74 -74
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -220,7 +220,7 @@ tsuga logs patterns --rationale "exploring telemetry to investigate prod outage"
220
220
 
221
221
  ### Available resources
222
222
 
223
- `cloud-resources`, `dashboard-folders`, `dashboards`, `ingestion-api-keys`, `investigations`, `monitors`, `notification-integrations`, `notification-rules`, `notification-silences`, `quality-reports`, `retention-policies`, `log-routes`, `services`, `slos`, `tag-policies`, `teams`
223
+ `cloud-resources`, `dashboard-folders`, `dashboards`, `ingestion-api-keys`, `investigations`, `monitors`, `notification-integrations`, `notification-rules`, `notification-silences`, `public-tokens`, `quality-reports`, `retention-policies`, `log-routes`, `services`, `slos`, `tag-policies`, `teams`
224
224
 
225
225
  > Notes:
226
226
  >
@@ -230,6 +230,14 @@ tsuga logs patterns --rationale "exploring telemetry to investigate prod outage"
230
230
  > - For `quality-reports list`, pass `--cluster <CLUSTER_ID>` (or set `TSUGA_CLUSTER_ID` / saved default) when the org has more than one cluster.
231
231
  > - Pass `--team <TEAM_NAME>` to `quality-reports list` to scope the response to a single team by name (omits cluster-wide global rows).
232
232
  > - `investigations` is beta: it requires an operation API key with the `investigations` permission and the API may change.
233
+ > - `public-tokens` manages the RUM public tokens configured in browser and mobile SDKs. It requires an operation API key with the **RUM public tokens** (`rum-public-token`) permission.
234
+
235
+ ```bash
236
+ tsuga public-tokens create --generate-skeleton > app.json
237
+ # edit app.json
238
+ tsuga public-tokens create -f app.json | jq -r .token
239
+ tsuga public-tokens list | jq -r '.[0].token'
240
+ ```
233
241
 
234
242
  ### Generating a request skeleton
235
243
 
@@ -358,6 +366,67 @@ tsuga traces latency-summary --trace-id 78c99c5bb1e4a30297fa134b9dbec64f --from
358
366
  tsuga traces latency-summary --trace-id 78c99c5bb1e4a30297fa134b9dbec64f --from -30m --min-range-duration-ms 50
359
367
  ```
360
368
 
369
+ ### Contrast sets
370
+
371
+ Compares a target group of spans against a baseline and returns the attribute
372
+ values that are over-represented in the target — what those spans have in common
373
+ that the baseline ones do not. Each group carries its own filter and time range.
374
+
375
+ Filters are written in TQL, the same query language as `--query` elsewhere: terms
376
+ are ANDed by whitespace, `span_attributes.*` addresses span attributes, and
377
+ `duration` is in milliseconds. Run `tsuga docs get explore/query-syntax` for the
378
+ full syntax.
379
+
380
+ ```bash
381
+ tsuga traces contrast-sets --generate-skeleton > groups.json
382
+ tsuga traces contrast-sets -f groups.json
383
+ ```
384
+
385
+ Time ranges are Unix seconds, and unlike `--from` / `--to` they are not resolved
386
+ from relative strings — the body takes numbers. The skeleton and the examples
387
+ below carry a fixed window that is long past, so substitute your own:
388
+
389
+ ```bash
390
+ TO=$(date +%s)
391
+ FROM=$((TO - 3600))
392
+ ```
393
+
394
+ Erroring spans against healthy ones, for one service in one window:
395
+
396
+ ```bash
397
+ cat > groups.json <<EOF
398
+ {
399
+ "targetGroup": {"filter": "context.service.name:checkout status_code:error", "timeRange": {"from": $FROM, "to": $TO}},
400
+ "baselineGroup": {"filter": "context.service.name:checkout NOT status_code:error", "timeRange": {"from": $FROM, "to": $TO}}
401
+ }
402
+ EOF
403
+ tsuga traces contrast-sets -f groups.json
404
+ ```
405
+
406
+ Slow spans against normal-latency ones:
407
+
408
+ ```bash
409
+ tsuga traces contrast-sets -d '{
410
+ "targetGroup": {"filter": "context.service.name:checkout duration:>2000", "timeRange": {"from": 1704067200, "to": 1704070800}},
411
+ "baselineGroup": {"filter": "context.service.name:checkout duration:<500", "timeRange": {"from": 1704067200, "to": 1704070800}}
412
+ }'
413
+ ```
414
+
415
+ Before and after a deployment — same filter, two windows:
416
+
417
+ ```bash
418
+ tsuga traces contrast-sets -d '{
419
+ "targetGroup": {"filter": "context.service.name:checkout", "timeRange": {"from": 1704070800, "to": 1704074400}},
420
+ "baselineGroup": {"filter": "context.service.name:checkout", "timeRange": {"from": 1704063600, "to": 1704067200}}
421
+ }'
422
+ ```
423
+
424
+ Each returned value reports `targetSupport` and `baselineSupport` (the percentage
425
+ of each group carrying it), `lift` (`targetSupport / baselineSupport`, omitted
426
+ when the value never appears in the baseline), and `pValue`. Narrow the findings
427
+ with `topK`, `minLift`, and `minSupport`; restrict the attributes tested with
428
+ `candidateAttrs`.
429
+
361
430
  ### Metrics
362
431
 
363
432
  ```bash