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

Method Diff

pkg/collector/scoped_distinct_string.go:132–154  ·  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

130
131// Diff returns all new strings collected since the last time Diff was called
132func (d *ScopedDistinctString) Diff() (map[string][]string, error) {
133 if !d.diffEnabled {
134 return nil, errDiffNotEnabled
135 }
136
137 d.mtx.Lock()
138 defer d.mtx.Unlock()
139
140 ss := map[string][]string{}
141
142 for k, v := range d.cols {
143 diff, err := v.Diff()
144 if err != nil {
145 return nil, err
146 }
147
148 if len(diff) > 0 {
149 ss[k] = diff
150 }
151 }
152
153 return ss, nil
154}

Callers 1

TestScopedDistinctDiffFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestScopedDistinctDiffFunction · 0.76