Documentation
¶
Overview ¶
Package topology runs the background aggregator that pre- computes service-level topology edges into the topology_edges_5m table. The /api/topology/service endpoint reads from that aggregated table instead of hammering spans with a self-join on every request — at billions-of-spans-per-day scale the live path is unworkable. See chstore.WriteTopologyBucket for the actual aggregation query.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
Aggregator wakes up every `interval` (5m by default) and runs WriteTopologyBucket for the most-recently-completed 5-min window. On boot it backfills `backfill` worth of buckets so the API has data from minute one.
HA-safe: a Redis lock elects a single writer per tick. Lock TTL is generous (2× interval) so a slow CH doesn't kill liveness.
func (*Aggregator) Start ¶
func (a *Aggregator) Start(ctx context.Context)