From 549ae33f06137a66f72d0042e3e0b88412e38f36 Mon Sep 17 00:00:00 2001 From: rays Date: Tue, 29 Sep 2026 13:35:43 +0000 Subject: [PATCH] Keep test daemons out of production's traces and database (#87) The browser suite's daemon took its environment from the shell running it, so a shell with OTEL_EXPORTER_OTLP_ENDPOINT set would have sent its fixture scans to production's Tempo, and one with IPX_DATABASE_URL set would have run the suite against production's database. Both are now blanked for it. Production's traces carry deployment.environment.name=production, which the dashboard filters on, so a daemon run by hand stays out as well. Co-Authored-By: Claude Opus 5.5 --- docker-compose.yml | 2 ++ playwright.config.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3457fad..dbbccbe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,8 @@ services: IPX_LOG: "ipx=info" # Traces to Tempo, in the monitoring project; ipx sends none without it. OTEL_EXPORTER_OTLP_ENDPOINT: "http://192.168.1.130:4318" + # What the dashboard filters on, so a daemon run by hand for testing stays out of it. + OTEL_RESOURCE_ATTRIBUTES: "deployment.environment.name=production" # IPX_DATABASE_URL=postgres://... to use Postgres; without it, /data/state.db (SQLite). env_file: - ipx.env # relative: Arcane resolves it inside its own container diff --git a/playwright.config.js b/playwright.config.js index 6e2dab3..c9b4fab 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -37,6 +37,10 @@ module.exports = defineConfig({ IPX_CONFIG: `${setup.root}/config/config.toml`, IPX_DATA_DIR: `${setup.root}/data`, IPX_LOG: 'ipx=info', + // Blank, whatever the shell running the suite has: the test daemon sends no traces to + // production's Tempo and never opens production's database. + OTEL_EXPORTER_OTLP_ENDPOINT: '', + IPX_DATABASE_URL: '', }, }, ],