TraceGrid Core Documentation
TraceGrid Core is a lightweight, zero-allocation telemetry collector and ring-buffer metrics exporter built for resource-constrained Linux edge nodes and single-board gateways.
Overview
Traditional observability agents routinely consume 250–600 MB of resident memory due to unbounded heap buffering and reflection-heavy serialization. TraceGrid Core uses fixed-size memory-mapped ring buffers and batch-flushes compact binary frames over persistent HTTP/2 and QUIC streams.
- Deterministic footprint: <18 MB RSS under 10,000 samples/sec sustained ingestion.
- Kernel-native counters: Reads eBPF socket maps,
/proc/net/tcp, andtcqdisc counters directly without spawning subprocesses. - Graceful backpressure: Drops stale histogram buckets rather than triggering host OOM conditions.
Quickstart
Install the static binary and initialize a default collector profile:
curl -fsSL https://releases.tracegrid.internal/install.sh | sh
tracegrid init --profile edge-linux --output /etc/tracegrid/agent.toml
systemctl enable --now tracegrid-agent.service
Verify local health and ring-buffer utilization:
tracegrid status --verbose
# Ring Buffer: 12.4% (508 KiB / 4096 KiB)
# Active Exporters: 1 healthy (flush p99: 4.2ms)
# Kernel Collectors: netdev, tcp_bbr, qdisc_fq
Configuration Schema
Edit /etc/tracegrid/agent.toml to adjust scrape cadence, retention windows, and TLS transport verification:
[agent]
node_id = "edge-phx-02"
scrape_interval_ms = 5000
ring_buffer_kb = 4096
max_memory_mb = 32
[collectors]
netdev = true
socket_bbr = true
qdisc_stats = true
process_rss = true
[exporter.otlp]
endpoint = "https://ingest.tracegrid.internal:4318/v1/metrics"
compression = "zstd"
flush_interval_s = 15
tls_min_version = "1.3"
Core Metrics Reference
| Metric Name | Type | Description |
|---|---|---|
tg_net_qdisc_drops_total | Counter | Packets dropped at root queuing discipline (e.g. fq / fq_codel). |
tg_tcp_retrans_ratio | Gauge | Rolling 60-second TCP segment retransmission percentage. |
tg_ring_occupancy_ratio | Gauge | Current fill level of the lock-free sample ring buffer. |
tg_exporter_flush_ms | Histogram | End-to-end export batch round-trip duration in milliseconds. |
Release Notes (v2.4.1)
- Added automatic pacing awareness for Linux 6.8
sch_fqhorizon timers. - Reduced idle wakeups by 42% on 1-vCPU and 2-vCPU virtualized hosts.
- Fixed histogram quantile rounding when bucket counts reset across clock jumps.