topology

package
v0.9.643 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 5 Imported by: 0

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 New

func New(store *chstore.Store, interval, backfill time.Duration, lock cache.Lock) *Aggregator

func (*Aggregator) Start

func (a *Aggregator) Start(ctx context.Context)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL