Repository navigation
feat(037): L4 observability — per-service tcp_/udp_ floor stat keys and the aether_l4_access_logs stream (#1023) - #1043
Merged
Merged
Conversation
…g, and the two L4 soak gates (#1023) Every L4 cluster now reports under its own alt_stat_name instead of the bare <ns>/<svc> key it shared with the service's other L4 clusters and its HTTP cluster: tcp_<ns>/<svc> (floor), tcp_<ns>/<svc>_<port> (per-port and primary-port alias), udp_<ns>/<svc> (UDP floor). "_" rather than ":" because Envoy's stat-name sanitizer rewrites ":" to "_": the key aether writes is the aether_cluster label, and a gate on "tcp:.*" would have matched nothing. Every tcp_proxy chain on the capture listener (floor, per-port, TCPRoute, any-port shim, TLSRoute SNI, blackhole) carries a connection-level OTel access log on the new stream log_name=aether_l4_access_logs, behind the existing access-log switch and sink; the passthrough default chain and UDP are not logged. No `reporter` attribute, so the collector's HTTP identity counters are untouched. Gates: //test/envoy_validate asserts every L4 cluster's key and uniqueness and that every capture tcp_proxy chain carries the L4 log, runs the chart's own aether.cluster regex over the sanitized keys, and drives both checks red by fault injection; a cache unit test pins the keys the snapshot emits. The soak README seeds the two L4 zero-reading gates with rev242/rev243 as negative controls; the runbook documents the stream, the keys and the L4 SAN join. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…the tcp: config name (#1023) Envoy's %UPSTREAM_CLUSTER% renders the cluster's alt_stat_name, so on the aether_l4_access_logs stream upstream_cluster reads tcp_<ns>/<svc>[_<port>] (observed on kind: upstream_cluster=tcp_aether-test/l4-front). The runbook's per-service query `upstream_cluster:~"^tcp:tcp-echo[.]aether-test[.]"` could never match; spell it against the stat key and say so in the field table. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This was referenced Sep 28, 2026
bpalermo
added a commit
that referenced
this pull request
Sep 29, 2026
Brings #979 up to date with 36 commits of main (demand-scoped twins #1020/#1032, fresh-stream classifier #1033/#1035, dormant-pair ledger #1036/#1038, per-twin EDS names #1012/#1029, the twin certificate gate #1051, the ODCDS always-answer override, --east-west-quic-idle-timeout #1063, L4 stat keys #1043, access-log timing #1048, the identity gate #1055, hot-restart knobs #1068 and the carried Envoy patches) while keeping #979's intent: no allow-list, every destination in the node's dependency set is QUIC-eligible. Resolution: - cache: quicServices / SetEastWestQUICServices removed. armsFor gives arms to every default, identity-ready, non-waypointed entry whose service is in the dependency set (the same rule recordQUICPair admits by, so no route names a twin the agent would refuse); twins stay demand-scoped. The destination_not_quic_enabled refusal/prune reason is gone. - quicpairs: the dependency-set prune now waits for the pod set like the source prune does -- the allow-list used to force its destinations into the set, and without it the first snapshot after an agent restart dropped every restored pair (TestQUICDemandPairSurvivesAgentRestart was red). - fan-out log: allow_listed_services dropped; observed_pairs and awaiting_client_cert kept. - chart 1.0.12: eastWestQuicServices removed, eastWestQuicIdleTimeout and its parentShutdownTime check kept. - e2e/eastwest-quic.sh: main's demand-scoped E1/E4c/E6 + #979's QUIC_DNS_SANS negative control; h2only/E3 removed; E6 dials quic-a and its idgate-* pairs are excluded from the driven-pair count. eastwest-quic-hotrestart.sh's h2 control is now the weighted GAMMA split (the one h2-by-design path). - tests, runbook, soak README, configuration.md, 038 rewritten for the unconditional state. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1023
What / why
Until now every L4 cluster (the TCP floor, its primary-port alias, every per-port TCP cluster and the UDP floor) passed the bare
<ns>/<svc>service key asalt_stat_name. For a service that also serves HTTP, they all reported into the sameaether_clusterseries as the HTTP cluster, so anssl_fail_verify_santick could not be assigned to a cluster kind. The #1007 attribution had to rule HTTP out from access logs, and an L4 hop had no access-log record at all.This PR:
Per-kind L4 stat keys (
agent/internal/xds/cache/capture.go, helpers inagent/internal/xds/proxy/egress.go):aether_clustertcp:<fqdn>tcp_<ns>/<svc>tcp:<fqdn>:<port>tcp_<ns>/<svc>_<port>udp:<fqdn>udp_<ns>/<svc><ns>/<svc>,<ns>/<svc>@<ns>/<sa>)A connection-level L4 access log, on its own OTLP stream
log_name=aether_l4_access_logs(proxy/accesslog.go,attachL4AccessLoginproxy/capture.go). It goes on every capturetcp_proxychain: floor, per-port, TCPRoute-weighted, the any-port shim, TLSRoute SNI chains and the blackhole. It writes one record when a connection closes. It keeps every connection with a response flag, plus the HTTP log's success sample, and uses the same switch (MeshConfigaccessLogsEnabled) and the same sink. It deliberately has noreporterattribute, so it cannot enter the collector's HTTP identity counters. It is not attached to the passthrough chain or to UDP (there is no per-datagram log).Tests:
test/envoy_validate/l4_observability_test.go(real Envoy validation, including the chart's own tag regex run over the keys after sanitization),cache/l4_stat_keys_test.go,proxy/l4observability_test.go.charts/aether1.0.2 → 1.0.3. Runbook sections "L4 stat keys and the L4 access log" and the L4-hop join; the two L4 soak gates ine2e/soak/README.md; a note in proposal 037.Naming:
_, not:Envoy sanitises every stat name and tag value (
Stats::Utility::sanitizeStatsNamerewrites:to_). Atcp:<ns>/<svc>:<port>key would therefore be exported astcp_<ns>/<svc>_<port>anyway, and a selector written astcp:.*would match nothing, forever. Aether now writes the sanitised form, so the config and the label are the same string. It is unambiguous because namespaces and service names are DNS labels and cannot contain_. The keys contain no dot, so the chart's^cluster\.(([^.]+)\.)tag captures each key whole.A dashboard or alert that selects an L4 service by its bare key (for example
aether_cluster="aether-test/tcp-echo") reads no series from a #1023 proxy onward. Move it to the new shapes:tcp_<ns>/<svc>: TCP floortcp_<ns>/<svc>_<port>: TCP per-port or primary-port aliasudp_<ns>/<svc>: UDP floorHTTP selectors (
<ns>/<svc>,<ns>/<svc>(@.*)?) are unaffected and cannot match an L4 key.Kind evidence (
e2e/l4routes.sh, SPIRE on, etcd registry, plus a stand-in OTel collector with the debug exporter)otel.endpointwas set viahelm upgrade -f <get values>and MeshConfigaccessLogsEnabled: truewas patched in, then agent and proxy were restarted.Regression net:
e2e/l4routes.sh verify, all green:Proxy admin
/statsafter verify. UDP was sampled while T3's UDPRoute was live, because T3.2 deletes it:/stats?filter=^cluster\.aether-test/l4returned 0 lines: no L4 cluster reports under a bare key any more.Collector,
aether_l4_access_logs: 999 records over the run (TCP floor, TCPRoute-weighted and TLSRoute SNI chains):TLSRoute record:
filter_chain_name=cap_tls_…_1_p9443 requested_server_name=alpha.l4tls.test upstream_cluster=tcp_aether-test/l4tls-a_9443 upstream_peer_uri_san=…/sa/l4tls-a. UDP produces no L4 access-log record, by design; its evidence is theudp_key above.The kind run found one error in the docs, fixed in ba4272a.
%UPSTREAM_CLUSTER%renders the cluster'salt_stat_name, so the log'supstream_clusteris the stat key (tcp_<ns>/<svc>[_<port>]), not thetcp:<fqdn>config name. The runbook's per-service LogsQL queryupstream_cluster:~"^tcp:tcp-echo…"could never match; it is now written against the stat key.Testing
bazel test //agent/internal/xds/proxy:all //agent/internal/xds/cache:all //test/envoy_validate:all //charts/aether:all: passedmake format-check: cleanbazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...: cleane2e/l4routes.sh up && verifyplus the collector (above)🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr