MCPcopy
hub / github.com/grafana/tempo / DrainSanitizer

Struct DrainSanitizer

modules/generator/registry/drain_sanitizer.go:31–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29type sanitizeModeFunc func(tenant string) string
30
31type DrainSanitizer struct {
32 mtx sync.Mutex
33 drain *drain.Drain
34 demand *Cardinality
35
36 tenant string
37 sanitizeModeF sanitizeModeFunc
38
39 metricTotalSpansSanitized prometheus.Counter
40 demandGauge prometheus.Gauge
41
42 // channels for periodic maintenance. these allow us to avoid spawning
43 // additional goroutines and rely on the fact that Sanitize is called
44 // frequently from the registry.
45 demandUpdateChan <-chan time.Time
46 pruneChan <-chan time.Time
47}
48
49func NewDrainSanitizer(tenant string, sanitizeModeF sanitizeModeFunc, staleDuration time.Duration) *DrainSanitizer {
50 return &DrainSanitizer{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected