Files
magpie/internal/otlp
yetone 33f21bdb1f otlp: a global proxy switch drops the exporter's idle connection to the collector (#4824)
The residue ggbdpq's #4824 patch named. The OTel exporter keeps its own
long-lived transport (Proxy: netproxy.Func). An https collector gets
HTTP/2, which pools by authority alone, so after the global proxy moved,
every batch kept going through the old proxy's connection. The exporter
now holds a netproxy.Watch, and send closes the client's idle
connections when the proxy has moved since the last send. An exporter
built without one (otel_cost_test's literal) skips the check.

Run at the pushed head (on mote, base 4d55a0a02)
- TestOTelGlobalSwitchDialsThroughTheNewProxy is new. It uses an HTTPS
  HTTP/2 collector and two counting SOCKS5 proxies, and passes. The
  otlp package passes.
- The full suite, gofmt and the cross-OS vet are as recorded in the
  #4824 netproxy commit before this one. The only reds are #4826 and
  #4807, neither in otlp.

Broken by hand: with the moved check off, the test is red: "after the
switch: 2 at the collector, 1 connections through A, 0 through B".

Not tried: a real OTel collector behind a real proxy switch.
2026-11-02 09:11:30 +08:00
..