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

Method Diff

pkg/collector/distinct_string_collector.go:138–156  ·  view source on GitHub ↗

Diff returns all new strings collected since the last time diff was called

()

Source from the content-addressed store, hash-verified

136
137// Diff returns all new strings collected since the last time diff was called
138func (d *DistinctString) Diff() ([]string, error) {
139 // can check diffEnabled without lock because it is not modified after creation
140 if !d.diffEnabled {
141 return nil, errDiffNotEnabled
142 }
143
144 d.mtx.Lock()
145 defer d.mtx.Unlock()
146
147 ss := make([]string, 0, len(d.new))
148
149 for k := range d.new {
150 ss = append(ss, k)
151 }
152
153 clear(d.new)
154 sort.Strings(ss)
155 return ss, nil
156}

Callers 15

TestTempoDBQueryRangeFunction · 0.45
tempopbTraceEqualFunction · 0.45
traceEqualFunction · 0.45
tempopbTraceEqualFunction · 0.45
traceEqualFunction · 0.45
NewSearchTagsFunction · 0.45
NewSearchTagsV2Function · 0.45
NewSearchTagValuesFunction · 0.45
NewSearchTagValuesV2Function · 0.45

Calls 1

StringsMethod · 0.45