You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
access logs: tags are keyed by the frontend rule's hostname but read by the request authority, so every wildcard/regex frontend logs without its tags #1379
The HTTP and HTTPS proxies key the access-log tag cache by the frontend rule's
hostname, but read it back by the request's authority. The store is a BTreeMap<String, CachedTags> (https.rs:1142, http.rs:736) and the read is self.tags.get(key) (https.rs:1150-1152, http.rs:745-747) — exact key, no
pattern resolution.
HTTP is the twin (http.rs:1176). front.hostname is whatever the operator
configured: *.example.com for a wildcard frontend, /foo.*/.example.com for a
regex one, an arbitrary string for a Pre/Post rule.
Read side (lib/src/protocol/mux/stream.rs:397-403):
let tags = context.authority.as_deref().and_then(|host| {let hostname = match host.split_once(':'){None => host,Some((hostname, _)) => hostname,};
listener.get_tags(hostname)});
context.authority is a concrete host from the wire — foo.example.com.
Consequence
For every frontend whose hostname is not an exact literal, the key written can
never be produced by the key read, so get_tags returns None and the configured
tags are silently absent from every access log line for that frontend. Exact
frontends are unaffected, which is why this does not show up in ordinary testing.
Three distinct ways to miss, all from the same asymmetry:
port — the read strips :port, the write does not, so a frontend hostname
carrying a port never matches;
case — the write stores the operator's spelling, the read uses the request's.
tcp.rs already solved this
The TCP proxy builds a structured key with the same function on both sides: sni_tags_key(&address, &sni, &front.alpn) at tcp.rs:2789/:2793 for the write
and tcp.rs:405 for the read, with TcpFrontendTagsKey::Address(address) as the
non-SNI fallback. HTTP/HTTPS pass raw strings from two different sources.
Suggested direction
Resolve the tag lookup through the router rather than a parallel exact map: the
router already knows which frontend rule matched this request, and that rule is the
only correct tag owner. Failing that, key the map by the matched frontend's
identity rather than by a hostname string that two call sites spell differently.
A regression test should assert that a request to foo.example.com against a *.example.com frontend carries that frontend's tags in the access log — it is
red today.
Activity
fix(http): resolve access-log tags through the router, not a hostname…
ci(doc): report a file.rs:NNN citation whose line moved, not just a b…