Repository navigation
feat(proxylogs): show registry proxy name in proxy log columns - #12814
diegosouzapw merged 4 commits into
Conversation
0aea1b1 to
78cea90
Compare
|
Nice, contained fix for a real operator pain point (indistinguishable proxy rows when several |
0ac4af0 to
675985f
Compare
Registry resolution already attaches name to the runtime proxy object; the name was dropped at the persistence boundary (ProxyInfo had no name field) and never rendered. Add proxy_name column (base schema + ALTER heal for existing DBs), persist/hydrate it, render it in the ProxyLogger table and ProxyLogDetail pane with host:port fallback, and search by name. Local-only (PMO City): not submitted upstream. Re-apply after upgrades via patch file (see pmo-city-builds omniroute/Operator/runbooks/upgrade.md).
The v3.8.50 rebase kept upstream's batched proxy-log persistence (enqueueProxyLogs/flushProxyLogsSync); logProxyEvent no longer writes synchronously, so the persist+hydrate test closed the DB before the row was flushed. Flush explicitly first.
…oxy logs Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
675985f to
c9f4fad
Compare
|
Thanks @tiangao88 — merging via the release merge-train. Validated in local merge-train (merge-train-20260918-130526-suite.log) on the devbox @ train tip 28fb420c9ad860ba275294ebb4ebbecb9da83318 with the sibling PRs of this batch: static gates green; changed-area node:test 293/294 (0 failing) + vitest 482/482 (fast parity — full suite ran today on the tip via the base-red and 3b trains). Merged --admin per merge-gates §7. |
fda9ef7
into
diegosouzapw:release/v3.8.51
…proxy_logs.proxy_name) Maintainer-side count bump after the two migration PRs merged; the docs-counts gate reads README.md, AGENTS.md and llm.txt (+ its 65 i18n mirrors), all of which are agent-instruction / protected surfaces the contributor PRs must not touch. check:docs-counts and check:docs-sync green.
…souzapw#12814) * feat(proxylogs): show registry proxy name in proxy log columns Registry resolution already attaches name to the runtime proxy object; the name was dropped at the persistence boundary (ProxyInfo had no name field) and never rendered. Add proxy_name column (base schema + ALTER heal for existing DBs), persist/hydrate it, render it in the ProxyLogger table and ProxyLogDetail pane with host:port fallback, and search by name. Local-only (PMO City): not submitted upstream. Re-apply after upgrades via patch file (see pmo-city-builds omniroute/Operator/runbooks/upgrade.md). * test(proxylogs): flush batched writes before asserting persisted row The v3.8.50 rebase kept upstream's batched proxy-log persistence (enqueueProxyLogs/flushProxyLogsSync); logProxyEvent no longer writes synchronously, so the persist+hydrate test closed the DB before the row was flushed. Flush explicitly first. * test(proxylogs): drain batched queue in resetStorage to avoid cross-test row bleed * docs(changelog): add changelog fragment for proxy registry name in proxy logs Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: Tiangao (hermes) <montigaud@aikumi.pro> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
… seed, diegosouzapw#12814 proxy_logs.proxy_name) Maintainer-side count bump after the two migration PRs merged; the docs-counts gate reads README.md, AGENTS.md and llm.txt (+ its 65 i18n mirrors), all of which are agent-instruction / protected surfaces the contributor PRs must not touch. check:docs-counts and check:docs-sync green.
Problem
The Proxy Logs page (
/dashboard/logs/proxy) renders the "Proxy" column ashost:port. When several registry entries share one gateway (e.g. amulti-country residential pool), every row shows the same string and operators
cannot tell which configured proxy handled a request. The registry already
stores a human-meaningful
nameper proxy.Cause
toRegistryProxyResolution(mappers) attachesnameto the runtime proxyobject, but
ProxyInfoinsrc/lib/proxyLogger.tsdoes not carry it — thename is dropped at the persistence boundary and never rendered.
Change
proxy_nameas migration181_proxy_logs_proxy_name.sql, with theversion-keyed idempotency check in
migrationRunner(same shape as 179'supstream_status), so fresh installs and existing databases both get thecolumn. The
ensureProxyLogsColumnsALTER heal stays as the boot-timebelt-and-suspenders.
src/lib/db/core.tsis deliberately left untouched —its frozen file-size ratchet stays at 1770 lines.
namethroughProxyInfo; persist and hydrate it.falling back to
host:port(andtype://host:port) for legacy/direct rows.[ProxyEgress]log line (newformatProxyEgressConsoleLineformatter) and in the log search.
Tests
tests/unit/proxy-logger-name.test.ts— name carried on the log entry,persists + hydrates from SQLite, search matches name, legacy no-name rows
hydrate cleanly.
tests/unit/migration-181-proxy-logs-proxy-name.test.ts—the migration adds the column on a database that lacks it, and is recorded
without re-adding it when the boot heal already ran (no cross-talk with 179).
Related proxy-logger + migration suites remain green (14/14). The detail-pane
label moved into a module-scope helper so the component's cyclomatic
complexity stays inside the ratchet.
Notes
Non-breaking: existing rows without a name still render host:port.
Rebased onto the current
release/v3.8.51tip (0cc016936); changelogfragment in
changelog.d/features/.