NewScopedDistinctString collects the tags per scope MaxDataSize is calculated as the total length of the recorded strings. MaxTagsPerScope controls how many tags can be added per scope. The intrinsic scope is unbounded. For ease of use, maxDataSize=0 and maxTagsPerScope=0 are interpreted as unlimite
(maxDataSize int, maxTagsPerScope uint32, staleValueThreshold uint32)
| 24 | // MaxTagsPerScope controls how many tags can be added per scope. The intrinsic scope is unbounded. |
| 25 | // For ease of use, maxDataSize=0 and maxTagsPerScope=0 are interpreted as unlimited. |
| 26 | func NewScopedDistinctString(maxDataSize int, maxTagsPerScope uint32, staleValueThreshold uint32) *ScopedDistinctString { |
| 27 | return &ScopedDistinctString{ |
| 28 | cols: map[string]*DistinctString{}, |
| 29 | newCol: NewDistinctString, |
| 30 | maxDataSize: maxDataSize, |
| 31 | diffEnabled: false, |
| 32 | maxTagsPerScope: maxTagsPerScope, |
| 33 | maxCacheHits: staleValueThreshold, |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | // NewScopedDistinctStringWithDiff collects the tags per scope with diff |
| 38 | // MaxDataSize is calculated as the total length of the recorded strings. |
no outgoing calls