@gw-tools/gw 0.63.0-beta.73.2 → 0.63.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 (2) hide show
  1. package/README.md +0 -117
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -25,7 +25,6 @@ A command-line tool for managing git worktrees, built with Deno.
25
25
  - [Auto-Detection](#auto-detection)
26
26
  - [Example Configuration](#example-configuration)
27
27
  - [Configuration Options](#configuration-options)
28
- - [Telemetry (OpenTelemetry & Dash0)](#telemetry-opentelemetry--dash0)
29
28
  - [Commands](#commands)
30
29
  - [checkout](#checkout)
31
30
  - [Arguments](#arguments)
@@ -386,7 +385,6 @@ All fields are optional and safe to commit — no machine-specific paths or runt
386
385
  - **cleanThreshold**: Number of days before worktrees are considered stale for `gw clean` (defaults to 7, set via `gw init --clean-threshold`)
387
386
  - **autoClean**: Silently remove stale worktrees in the background when running `gw checkout` or `gw list` (defaults to false, set via `gw init --auto-clean`)
388
387
  - **updateStrategy**: Default strategy for `gw update` command: "merge" or "rebase" (defaults to "merge", set via `gw init --update-strategy`)
389
- - **telemetry**: Opt-in OpenTelemetry / Dash0 telemetry (disabled by default). See [Telemetry](#telemetry-opentelemetry--dash0)
390
388
 
391
389
  ### Local Overrides (`config.local.json`)
392
390
 
@@ -401,121 +399,6 @@ Create `.gw/config.local.json` to override any config value for your machine onl
401
399
 
402
400
  Local config is merged on top of `config.json` (shallow merge, local wins). Useful for adding personal files to `autoCopyFiles` without modifying the team config.
403
401
 
404
- ## Telemetry (OpenTelemetry & Dash0)
405
-
406
- `gw` can emit [OpenTelemetry](https://opentelemetry.io/) traces and logs so you
407
- can observe how the tool is used and **correlate releases with errors** in
408
- [Dash0](https://www.dash0.com/). It is **opt-in and disabled by default** — no
409
- telemetry leaves your machine unless you turn it on.
410
-
411
- `gw init` writes a `"telemetry": { "enabled": false }` block into your
412
- `.gw/config.json` so the option is easy to find — flip `enabled` to `true` to
413
- start sending.
414
-
415
- ### What gets sent
416
-
417
- When enabled, each command emits:
418
-
419
- - **One span** per invocation (`gw <command>`) with `gw.command`,
420
- `gw.command.exit_code`, `gw.command.duration_ms`, and `service.version`.
421
- - **One log record** — `INFO` on success, `ERROR` (with `error.message`) on
422
- failure.
423
-
424
- Every signal carries the `service.version` resource attribute. That, combined
425
- with a **deployment event** emitted by the release pipeline (see below), is
426
- what lets Dash0 line up "a new version shipped" with "errors started".
427
-
428
- `gw` never sends branch names, repository paths, or file names. Error messages
429
- are included so failures can be investigated — redact them in the Collector if
430
- that is a concern.
431
-
432
- > **Design note:** telemetry is fully fail-open. Any export error is swallowed
433
- > and never slows down or breaks a command, and nothing is ever written to
434
- > stdout (so shell-eval commands like `gw cd` stay safe).
435
-
436
- ### Recommended setup: via a local OpenTelemetry Collector
437
-
438
- Point `gw` at a local [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/)
439
- that holds your Dash0 auth token and forwards telemetry on. This keeps the
440
- token out of any committed config, keeps the CLI fast (the Collector ACKs
441
- locally), and lets you redact/transform data centrally.
442
-
443
- 1. Enable it in `.gw/config.json`:
444
-
445
- ```jsonc
446
- {
447
- "telemetry": {
448
- "enabled": true,
449
- "endpoint": "http://localhost:4318", // local OTel Collector
450
- "environment": "production" // deployment.environment.name
451
- }
452
- }
453
- ```
454
-
455
- 2. Run a Collector that exports to Dash0 (token stays in the Collector config,
456
- not in your repo):
457
-
458
- ```yaml
459
- # otel-collector.yaml
460
- receivers:
461
- otlp:
462
- protocols:
463
- http: { endpoint: 0.0.0.0:4318 }
464
- exporters:
465
- otlp/dash0:
466
- endpoint: ${env:DASH0_OTLP_ENDPOINT} # e.g. ingress.<region>.aws.dash0.com:4317
467
- headers:
468
- Authorization: Bearer ${env:DASH0_AUTH_TOKEN}
469
- Dash0-Dataset: ${env:DASH0_DATASET}
470
- service:
471
- pipelines:
472
- traces: { receivers: [otlp], exporters: [otlp/dash0] }
473
- logs: { receivers: [otlp], exporters: [otlp/dash0] }
474
- ```
475
-
476
- ### Alternative: send straight to Dash0
477
-
478
- Skip the Collector and supply the endpoint and token via env vars (or
479
- `.gw/config.local.json`, which is gitignored). **Never** put the token in the
480
- committed `config.json`:
481
-
482
- ```bash
483
- export GW_TELEMETRY=1
484
- export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingress.<region>.aws.dash0.com:4318"
485
- export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <token>,Dash0-Dataset=default"
486
- ```
487
-
488
- ### Configuration & env vars
489
-
490
- | Setting | `config.json` key | Env override | Default |
491
- | ------------- | ----------------------- | ----------------------------- | ----------------------- |
492
- | Enable | `telemetry.enabled` | `GW_TELEMETRY` (`1`/`0`) | `false` |
493
- | Endpoint | `telemetry.endpoint` | `OTEL_EXPORTER_OTLP_ENDPOINT` | `http://localhost:4318` |
494
- | Environment | `telemetry.environment` | `OTEL_RESOURCE_ATTRIBUTES` | _(unset)_ |
495
- | Service name | `telemetry.serviceName` | `OTEL_SERVICE_NAME` | `gw` |
496
- | Headers | `telemetry.headers` | `OTEL_EXPORTER_OTLP_HEADERS` | _(none)_ |
497
- | Flush timeout | `telemetry.timeoutMs` | — | `1500` |
498
-
499
- `OTEL_SDK_DISABLED=true` is honoured as a hard kill switch. Set
500
- `GW_TELEMETRY_DEBUG=1` to log export problems to stderr while setting things up.
501
-
502
- ### Correlating deployments with errors
503
-
504
- The release pipeline (`scripts/release-ci.sh`) sends a `deployment.success`
505
- event log to Dash0 after a successful publish, tagged with the released
506
- `service.version` and the git commit. Because runtime error signals carry the
507
- same `service.version`, Dash0 can show a deployment marker on the error
508
- timeline and compare error rates before and after each release.
509
-
510
- You can also send one manually:
511
-
512
- ```bash
513
- OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318" \
514
- deno run --allow-net --allow-env --allow-read \
515
- packages/gw-tool/scripts/send-deployment-event.ts \
516
- --version 1.2.3 --environment production --commit "$(git rev-parse HEAD)"
517
- ```
518
-
519
402
  ## Commands
520
403
 
521
404
  ### checkout
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gw-tools/gw",
3
- "version": "0.63.0-beta.73.2",
3
+ "version": "0.63.0",
4
4
  "description": "A command-line tool for managing git worktrees - copy files between worktrees with ease",
5
5
  "keywords": [
6
6
  "git",