From 7539ab5c94761a9aa39dead314ff1da690ec5898 Mon Sep 17 00:00:00 2001 From: Florent Tapponnier Date: Thu, 16 Jul 2026 13:20:00 +0200 Subject: [PATCH] ws-head-latency: align region env var with rpc-capabilities (REGION not OCB_REGION) Every other multi-region harness on Railway (rpc-capabilities, aggregator-head-lag, evm-swap-quoting, pm-rate-limits, etc.) reads REGION from env. Making ws-head-latency read REGION too keeps the Railway service config uniform across the whole harness fleet. --- harnesses/ws-head-latency/cmd/script/metrics.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/harnesses/ws-head-latency/cmd/script/metrics.go b/harnesses/ws-head-latency/cmd/script/metrics.go index 8df51f2f..af8f2842 100644 --- a/harnesses/ws-head-latency/cmd/script/metrics.go +++ b/harnesses/ws-head-latency/cmd/script/metrics.go @@ -16,15 +16,16 @@ import ( // VPS + Railway hybrid) never collides series across vantage points // and no observation site needs to know about the region. // -// Region resolution order at startup: OCB_REGION, then -// RAILWAY_REPLICA_REGION (Railway sets it automatically), then the -// eu-west default that matches the historical single-vantage Paris -// VPS deployment. Set OCB_REGION explicitly on each replica to +// Region resolution order at startup: REGION (matches the convention +// used by rpc-capabilities and every other multi-region harness on +// Railway), then RAILWAY_REPLICA_REGION (Railway auto-sets it), then +// the eu-west default that matches the historical single-vantage +// Paris VPS deployment. Set REGION explicitly on each replica to // guarantee a stable value across redeploys. var region = resolveRegion() func resolveRegion() string { - if r := os.Getenv("OCB_REGION"); r != "" { + if r := os.Getenv("REGION"); r != "" { return r } if r := os.Getenv("RAILWAY_REPLICA_REGION"); r != "" {