Skip to content
Anubisx404Public

About

A repo-aware Go CLI that automates OpenTelemetry SDK setup, Docker LGTM provisioning, synthetic smoke tests, and root-cause reports.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Extent

CI GitHub Release Go

Extent is a CLI-first observability bootstrapper for local projects. It acts like a repo-aware observability engineer: it scans the project, maps runtime and framework signals, generates an OpenTelemetry observability contract, provisions a Docker LGTM stack, injects safe bootstrap instrumentation, verifies telemetry flow, scores signal quality, and generates bottleneck reports from Prometheus evidence. How it fits together is in docs/architecture.md.

Install

Building Extent needs Go 1.25+. Target projects can use any Go version. The local stack needs Docker with Compose v2.

Release binaries. Download the archive for your OS and architecture from GitHub Releases. Each release ships checksums.txt, a cosign signature, and provenance attestations. To verify them, follow RELEASING.md.

With Go:

go install github.com/Anubisx404/Extent/cmd/extent@latest
extent version

go install writes to $(go env GOPATH)/bin (%USERPROFILE%\go\bin on Windows).

Quickstart (about 5 minutes)

This uses a Node, Python, or Go app in a git repo with a clean working tree. Commands are shown for bash (macOS and Linux) and PowerShell (Windows). If extent is not on your PATH, use ./extent or .\extent.exe.

REPO=~/src/checkout
$REPO = "C:\src\checkout"

1. Scan (read-only):

extent scan "$REPO"
extent scan $REPO

2. Generate the observability files on a new branch. This writes extent.yaml, the Collector, Prometheus, Loki, Tempo, Grafana, and Compose files, and .env.observability. --branch needs a clean git tree. See docs/generated-files.md.

extent apply --branch observability/otel-lgtm --profile full "$REPO"
extent apply --branch observability/otel-lgtm --profile full $REPO

3. Preview, then apply, the bootstrap instrumentation. Review the diff first.

extent instrument --mode bootstrap --dry-run "$REPO"
extent instrument --mode bootstrap --apply "$REPO"
extent instrument --mode bootstrap --dry-run $REPO
extent instrument --mode bootstrap --apply $REPO

4. Install SDK dependencies:

extent deps --install "$REPO"
extent deps --install $REPO

5. Start the LGTM stack (Docker must be running):

extent stack up --wait --timeout 2m "$REPO"
extent stack up --wait --timeout 2m $REPO

6. Run the app with telemetry settings in the same shell. From the host, the endpoint is localhost:4318.

export OTEL_SERVICE_NAME=checkout
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
npm start   # or however you normally start the app
$env:OTEL_SERVICE_NAME = "checkout"
$env:OTEL_EXPORTER_OTLP_ENDPOINT = "http://localhost:4318"
npm start   # or however you normally start the app

7. Send traffic and check that telemetry arrived:

extent smoke --url http://localhost:8080/health --service checkout --requests 10
extent smoke --url http://localhost:8080/health --service checkout --requests 10

8. Verify the stack end to end. Grafana credentials come from the values apply recorded.

extent verify --url http://localhost:8080/health --service checkout --grafana http://localhost:3000 "$REPO"
extent verify --url http://localhost:8080/health --service checkout --grafana http://localhost:3000 $REPO

9. Open Grafana at http://localhost:3000. Log in as user admin, with the password from GRAFANA_ADMIN_PASSWORD in .env.observability:

grep GRAFANA_ADMIN_PASSWORD "$REPO/.env.observability"
Select-String GRAFANA_ADMIN_PASSWORD "$REPO\.env.observability"

10. Stop, or undo the instrumentation. stack down keeps data. instrument --undo refuses if you edited the injected files.

extent stack down "$REPO"
extent instrument --undo "$REPO"
extent stack down $REPO
extent instrument --undo $REPO

If a step fails, see docs/troubleshooting.md.

Running without Docker

If your project does not use Docker (or you want fast local HTTP smoke/stress benchmarking without starting the LGTM stack), use the no-docker profile and --local flags:

extent apply --profile no-docker "$REPO"
extent verify --url http://localhost:8080/health "$REPO"
extent smoke --local --url http://localhost:8080/health --duration 5s --concurrency 4
extent baseline --local --soak 5s --url http://localhost:8080/health --concurrency 4 "$REPO"
extent report --local --soak 5s --url http://localhost:8080/health --concurrency 4 --compare baseline --format html --output report.html "$REPO"

Support

A summary. The full table, with per-mode status and runtime notes, is in docs/support-matrix.md.

Runtime Frameworks Bootstrap Deep (codemods)
Node.js Express, NestJS, Next.js, Fastify stable experimental
Python Flask, FastAPI, Django stable experimental
Go net/http, Gin, Fiber stable (otelhttp WrapHandler auto-wraps http.ListenAndServe; slog OTLP log bridge) detection-only
.NET ASP.NET Core (with EF Core) stable experimental
Java Spring Boot detection-only detection-only
Svelte Svelte, SvelteKit detection-only detection-only

Runtime highlights:

  • Node.js: Supports CommonJS, ESM, and TypeScript entrypoints (server.ts, index.ts, src/server.ts, src/index.ts, src/main.ts).
  • Python: Supports requirements.txt and pyproject.toml (PEP 621 & Poetry), uv / poetry in extent deps, and Django (manage.py, wsgi.py, DjangoInstrumentor).
  • Go: Bootstrap auto-wraps http.ListenAndServe with otelhttp WrapHandler and configures the slog OTLP log bridge.
  • .NET: Bootstrap configures traces, metrics, and OTLP logging (WithLogging / AddOtlpExporter).

Deep mode needs --experimental and is outside the stable support contract.

Documentation

About

A repo-aware Go CLI that automates OpenTelemetry SDK setup, Docker LGTM provisioning, synthetic smoke tests, and root-cause reports.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages