Documentation
¶
Overview ¶
Package observability collects on-demand operational observations without changing the subsystems being observed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostSnapshot ¶
type HostSnapshot struct {
ObservedAt time.Time `json:"observed_at"`
ProcessRSSBytes HostValue `json:"process_rss_bytes"`
OpenFDs HostValue `json:"open_fds"`
StateAvailableBytes HostValue `json:"state_available_bytes"`
StateCapacityBytes HostValue `json:"state_capacity_bytes"`
}
HostSnapshot describes this process and the filesystem containing its state. Fields are observed sequentially, not as an atomic system-wide snapshot.
func CollectHost ¶
func CollectHost(stateDir string) HostSnapshot
CollectHost reads Linux's current process RSS, open descriptor count and available/capacity bytes for the filesystem containing stateDir. stateDir must be on a local filesystem. Reads and descriptor enumeration are size-bounded; kernel filesystem calls have no imposed deadline. RSS accounting scans the process mappings, so collection is on demand rather than constant-time.