Resolve production issues, fast. An open source observability platform unifying session replays, logs, metrics, traces and errors powered by ClickHouse and OpenTelemetry.
Find a file
Warren Lee 6e8ddd3736
feat: isolate dev environment for multi-agent worktree support (#1994)
## Summary
- Isolate dev, E2E, and integration test environments so multiple git worktrees can run all three simultaneously without port conflicts
- Each worktree gets a deterministic slot (0-99) with unique port ranges: dev (30100-31199), E2E (20320-21399), CI integration (14320-40098)
- Dev portal dashboard (http://localhost:9900) auto-discovers all running stacks, streams logs, and provides a History tab for past run logs

## Port Isolation

| Environment | Port Range | Project Name |
|---|---|---|
| Dev stack | 30100-31199 | `hdx-dev-<slot>` |
| E2E tests | 20320-21399 | `e2e-<slot>` |
| CI integration | 14320-40098 | `int-<slot>` |

All three can run simultaneously from the same worktree with zero port conflicts.

## Dev Portal Features

**Live tab:**
- Auto-discovers dev, E2E, and integration Docker containers + local services (API, App)
- Groups all environments for the same worktree into a single card
- SSE log streaming with ANSI color rendering, capped at 5000 lines
- Auto-starts in background from `make dev`, `make dev-e2e`, `make dev-int`

**History tab:**
- Logs archived to `~/.config/hyperdx/dev-slots/<slot>/history/` on exit (instead of deleted)
- Each archived run includes `meta.json` with worktree/branch metadata
- Grouped by worktree with collapsible cards, search by worktree/branch
- View any past log file in the same log panel, delete individual runs or clear all
- Custom dark-themed confirm modal (no native browser dialogs)

## What Changed

- **`scripts/dev-env.sh`** — Slot-based port assignments, portal auto-start, log archival on exit
- **`scripts/test-e2e.sh`** — E2E port range (20320-21399), log capture via `tee`, portal auto-start, log archival
- **`scripts/ensure-dev-portal.sh`** — Shared singleton portal launcher (works sourced or executed)
- **`scripts/dev-portal/server.js`** — Discovery for dev/E2E/CI containers, history API (list/read/delete), local service port probing
- **`scripts/dev-portal/index.html`** — Live/History tabs, worktree-grouped cards, search, collapse/expand, custom confirm modal, ANSI color log rendering
- **`docker-compose.dev.yml`** — Parameterized ports/volumes/project name with `hdx.dev.*` labels
- **`packages/app/tests/e2e/docker-compose.yml`** — Updated to new E2E port defaults
- **`Makefile`** — `dev-int`/`dev-e2e` targets with log capture + portal auto-start; `dev-portal-stop`; `dev-clean` stops everything + wipes slot data
- **`.env` files** — Ports use `${VAR:-default}` syntax across dev, E2E, and CI environments
- **`agent_docs/development.md`** — Full documentation for isolation, port tables, E2E/CI port ranges

## How to Use

```bash
# Start dev stack (auto-starts portal)
make dev

# Run E2E tests (auto-starts portal, separate ports)
make dev-e2e FILE=navigation

# Run integration tests (auto-starts portal, separate ports)
make dev-int FILE=alerts

# All three can run simultaneously from the same worktree
# Portal at http://localhost:9900 shows everything

# Stop portal
make dev-portal-stop

# Clean up everything (all stacks + portal + history)
make dev-clean
```

## Dev Portal

<img width="1692" height="944" alt="image" src="https://github.com/user-attachments/assets/6ed388a3-43bc-4552-aa8d-688077b79fb7" />

<img width="1689" height="935" alt="image" src="https://github.com/user-attachments/assets/8677a138-0a40-4746-93ed-3b355c8bd45e" />

## Test Plan
- [x] Run `make dev` — verify services start with slot-assigned ports
- [x] Run `make dev` in a second worktree — verify different ports, no conflicts
- [x] Run `make dev-e2e` and `make dev-int` simultaneously — no port conflicts
- [x] Open http://localhost:9900 — verify all stacks grouped by worktree
- [x] Click a service to view logs — verify ANSI colors render correctly
- [x] Stop a stack — verify logs archived to History tab with correct worktree
- [x] History tab — search, collapse/expand, view archived logs, delete
- [x] `make dev-clean` — stops everything, wipes slot data and history
2026-03-31 18:24:24 +00:00
.changeset virtualize nested filter groups (#1979) 2026-03-31 16:20:37 +00:00
.claude chore: add playwright agents for cursor and claude (#1847) 2026-03-05 15:16:18 +00:00
.cursor chore: add playwright agents for cursor and claude (#1847) 2026-03-05 15:16:18 +00:00
.github feat: isolate dev environment for multi-agent worktree support (#1994) 2026-03-31 18:24:24 +00:00
.husky chore: Add automatic api doc generation (#1397) 2025-11-21 21:14:02 +00:00
.opencode/commands small tweaks to opencode do-linear command (#1974) 2026-03-24 14:05:34 +00:00
.vex build(deps): add security resolutions for vulnerable npm packages (#1740) 2026-02-26 02:14:24 +00:00
.vscode add back linting prettier via eslint (#1463) 2025-12-11 12:00:31 -07:00
.yarn/releases feat: move more codes 2024-11-21 21:44:33 -08:00
agent_docs feat: isolate dev environment for multi-agent worktree support (#1994) 2026-03-31 18:24:24 +00:00
docker feat: support sample-weighted aggregations for sampled trace data (#1963) 2026-03-30 19:52:18 +00:00
docs/assets Move section collapse state to URL query params (#1958) 2026-03-24 13:58:30 +00:00
packages feat: isolate dev environment for multi-agent worktree support (#1994) 2026-03-31 18:24:24 +00:00
proxy feat: add subpath config (#1236) 2025-10-17 14:43:58 -07:00
scripts feat: isolate dev environment for multi-agent worktree support (#1994) 2026-03-31 18:24:24 +00:00
smoke-tests/otel-collector fix(otel-collector): improve log level extraction with word boundaries in regex (#1747) 2026-02-18 22:16:07 +00:00
.env feat: isolate dev environment for multi-agent worktree support (#1994) 2026-03-31 18:24:24 +00:00
.gitattributes first commit 2023-09-12 20:08:05 -07:00
.gitignore feat: isolate dev environment for multi-agent worktree support (#1994) 2026-03-31 18:24:24 +00:00
.kodiak.toml feat: support HYPERDX_LOG_LEVEL env var (#66) 2023-10-18 19:01:44 +00:00
.mcp.json chore: add playwright agents for cursor and claude (#1847) 2026-03-05 15:16:18 +00:00
.nvmrc chore: Update to next 16, react 19, add react compiler (#1434) 2025-12-04 23:40:59 +00:00
.prettierignore Search Relative Time Queries (#1305) 2025-10-29 15:49:10 +00:00
.prettierrc first commit 2023-09-12 20:08:05 -07:00
.yarnrc.yml feat: move more codes 2024-11-21 21:44:33 -08:00
AGENTS.md feat: isolate dev environment for multi-agent worktree support (#1994) 2026-03-31 18:24:24 +00:00
CLAUDE.md Migrate agent instructions to AGENTS.md for multi-agent support (#1925) 2026-03-16 20:27:25 +00:00
CONTRIBUTING.md feat: isolate dev environment for multi-agent worktree support (#1994) 2026-03-31 18:24:24 +00:00
DEPLOY.md update docs spelling (#1365) 2025-11-14 15:04:26 +00:00
docker-compose.ci.yml Enable parallel integration testing across multiple worktrees (#1917) 2026-03-16 19:42:08 +00:00
docker-compose.dev.yml feat: isolate dev environment for multi-agent worktree support (#1994) 2026-03-31 18:24:24 +00:00
docker-compose.yml chore: update clickhouse version for compose files to 26.1 (#1791) 2026-02-24 15:24:43 -05:00
knip.json chore: resolve remaining knip issues (#1991) 2026-03-27 20:17:47 +00:00
LICENSE first commit 2023-09-12 20:08:05 -07:00
LOCAL.md chore: pull images from custom registry domain (#523) 2024-12-09 20:18:18 -08:00
Makefile feat: isolate dev environment for multi-agent worktree support (#1994) 2026-03-31 18:24:24 +00:00
nx.json chore: enable nx caching on common-utils builds during dev (#1880) 2026-03-11 02:19:33 +00:00
package.json feat: isolate dev environment for multi-agent worktree support (#1994) 2026-03-31 18:24:24 +00:00
README.md chore: Update docs for ClickStack and HyperDX v2 Launch (#878) 2025-05-29 16:32:47 +00:00
tsconfig.base.json revert: api esbuild (#1280) 2025-10-21 09:27:47 +00:00
version.sh chore: align all versions on 2.0.0 (#886) 2025-06-03 20:48:08 +00:00
yarn.lock fix: render clickhouse keywords in codemirror (#2008) 2026-03-30 12:38:51 +00:00

hyperdx logo


HyperDX

HyperDX, a core component of ClickStack, helps engineers quickly figure out why production is broken by making it easy to search & visualize logs and traces on top of any ClickHouse cluster (imagine Kibana, for ClickHouse).

DocumentationChat on DiscordLive DemoBug ReportsContributingWebsite

  • 🕵️ Correlate/search logs, metrics, session replays and traces all in one place
  • 📝 Schema agnostic, works on top of your existing ClickHouse schema
  • 🔥 Blazing fast searches & visualizations optimized for ClickHouse
  • 🔍 Intuitive full-text search and property search syntax (ex. level:err), SQL optional!
  • 📊 Analyze trends in anomalies with event deltas
  • 🔔 Set up alerts in just a few clicks
  • 📈 Dashboard high cardinality events without a complex query language
  • { Native JSON string querying
  • Live tail logs and traces to always get the freshest events
  • 🔭 OpenTelemetry supported out of the box
  • ⏱️ Monitor health and performance from HTTP requests to DB queries (APM)

Search logs and traces all in one place

Spinning Up HyperDX

HyperDX can be deployed as part of ClickStack, which includes ClickHouse, HyperDX, OpenTelemetry Collector and MongoDB.

docker run -p 8080:8080 -p 4317:4317 -p 4318:4318 docker.hyperdx.io/hyperdx/hyperdx-all-in-one

Afterwards, you can visit http://localhost:8080 to access the HyperDX UI.

If you already have an existing ClickHouse instance, want to use a single container locally, or are looking for production deployment instructions, you can view the different deployment options in our deployment docs.

If your server is behind a firewall, you'll need to open/forward port 8080, 8000 and 4318 on your firewall for the UI, API and OTel collector respectively.

We recommend at least 4GB of RAM and 2 cores for testing.

Hosted ClickHouse Cloud

You can also deploy HyperDX with ClickHouse Cloud, you can sign up for free and get started in just minutes.

Instrumenting Your App

To get logs, metrics, traces, session replay, etc into HyperDX, you'll need to instrument your app to collect and send telemetry data over to your HyperDX instance.

We provide a set of SDKs and integration options to make it easier to get started with HyperDX, such as Browser, Node.js, and Python

You can find the full list in our docs.

OpenTelemetry

Additionally, HyperDX is compatible with OpenTelemetry, a vendor-neutral standard for instrumenting your application backed by CNCF. Supported languages/platforms include:

  • Kubernetes
  • Javascript
  • Python
  • Java
  • Go
  • Ruby
  • PHP
  • .NET
  • Elixir
  • Rust

(Full list here)

Once HyperDX is running, you can point your OpenTelemetry SDK to the OpenTelemetry collector spun up at http://localhost:4318.

Contributing

We welcome all contributions! There's many ways to contribute to the project, including but not limited to:

Motivation

Our mission is to help engineers ship reliable software. To enable that, we believe every engineer needs to be able to easily leverage production telemetry to quickly solve burning production issues.

However, in our experience, the existing tools we've used tend to fall short in a few ways:

  1. They're expensive, and the pricing has failed to scale with TBs of telemetry becoming the norm, leading to teams aggressively cutting the amount of data they can collect.
  2. They're hard to use, requiring full-time SREs to set up, and domain experts to use confidently.
  3. They requiring hopping from tool to tool (logs, session replay, APM, exceptions, etc.) to stitch together the clues yourself.

We hope you give HyperDX in ClickStack a try and let us know how we're doing!

Contact

HyperDX Usage Data

HyperDX collects anonymized usage data for open source deployments. This data supports our mission for observability to be available to any team and helps support our open source product run in a variety of different environments. While we hope you will continue to support our mission in this way, you may opt out of usage data collection by setting the USAGE_STATS_ENABLED environment variable to false. Thank you for supporting the development of HyperDX!

License

MIT