Skip to content

CONCEPT Cited by 1 source

TCP tracepoint

TCP tracepoints are stable kernel hook points for observing TCP socket state transitions. They were added to Linux around the 4.15-4.16 era (Brendan Gregg's TCP Tracepoints post is the canonical external reference cited by the Netflix source).

Unlike kprobes on TCP internal functions — whose signatures change across kernel versions — TCP tracepoints (tcp:tcp_*, sock:inet_sock_set_state, etc.) expose a stable contract that eBPF programs can attach to with confidence across distributions. This makes them the load-bearing primitive for fleet-wide TCP observability in production.

What observers get

TCP tracepoints fire on state transitions — connection established, RTT update, retransmit, state change to CLOSE — giving eBPF programs access to the socket structure, the peer addresses, timing, and counters without needing unstable internal offsets.

Canonical use in flow logs

FlowExporter attaches to TCP tracepoints to monitor socket state. When a socket closes, FlowExporter emits a flow-log record with IPs, ports, timestamps, and socket statistics. On average this produces ~5M records/sec fleet-wide.

Seen in

Last updated · 319 distilled / 1,201 read