Configure cloud and BYOC log routing - #3589
Open
rguliyev wants to merge 2 commits into
Open
Conversation
rguliyev
requested review from
ValentaTomas,
dobrac and
jakubno
as code owners
August 19, 2026 00:18
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
dobrac
approved these changes
Aug 19, 2026
rguliyev
force-pushed
the
feat/clickhouse-logs-env-gate
branch
from
August 19, 2026 01:18
93ea28f to
97a032d
Compare
This comment has been minimized.
This comment has been minimized.
rguliyev
force-pushed
the
feat/clickhouse-logs-env-gate
branch
from
August 19, 2026 03:02
97a032d to
770119a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLICKHOUSE_LOGS_READ_ENABLED=truereads persistent logs from ClickHouse; false/default reads Loki.CLICKHOUSE_LOGS_WRITE_ONLY=truewrites only to the dedicated local/logs/clickhouseendpoint.LOGS_COLLECTOR_ADDRESS; logs-collector owns the Loki + ClickHouse fan-out.Behavior
There is no read fallback. Missing or unavailable ClickHouse causes enabled persistent reads to fail. Temporary live builder logs remain independent and continue working without a persistent ClickHouse reader.
The write control reaches API, orchestrator, template-manager, and hyperloop/envd forwarding. False/default mode has one application destination—the collector—so the companion Terraform collector shadow cannot duplicate ClickHouse rows. True mode has one application destination—the local ClickHouse writer—and never falls back to Loki.
Staged rollout
The companion
e2b-dev/terraform#1368change is intentionally deployed first:Deployment defaults
orchestrator-ee.Scope
http://127.0.0.1:4321/logs/clickhousecontract; generic/logsis untouched.Validation
go test -race -count=1passed for shared logger/sandbox and orchestrator hyperloop handlers.golangci-lintpassed with zero issues.gofmtandgit diff --checkpassed.fmt, backendlessinit, andvalidatechecks passed.NewDualHTTPWriter,shadowEnabled,sandboxClickhouseAddr, or dynamic resolver identifiers.GATE-TRIGGER: customer-log persistence/read routing and staged removal of Loki.
GATE-APPROVED: human user, 2026-08-19, implement the cloud/BYOC matrix in existing PR #3589 only—cloud defaults to ClickHouse-only reads/writes; BYOC deployment defaults to Loki reads and dual writes; CLICKHOUSE_LOGS_READ_ENABLED enables BYOC ClickHouse reads; CLICKHOUSE_LOGS_WRITE_ONLY switches BYOC from dual writes to ClickHouse-only; no LaunchDarkly, no deployment.
GATE-APPROVED: human user, 2026-08-19, update and publish PRs #1368 and #3589 for Terraform-first preparation, collector-owned BYOC dual writes, and managed-cloud ClickHouse-only application routing.
Architecture reference:
architect-harness@a6f21d900e8f2ed714256b64aa4575e62dcee4a0(stale; refresh was blocked by unrelated dirty DES-020 work).