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

Method ingestTokens

pkg/drain/log_cluster.go:12–23  ·  view source on GitHub ↗
(tokens []string)

Source from the content-addressed store, hash-verified

10}
11
12func (c *LogCluster) ingestTokens(tokens []string) {
13 if len(tokens) != len(c.Tokens) {
14 panic("attempt to create template from sequences with different token lengths")
15 }
16 for i := range tokens {
17 if tokens[i] != c.Tokens[i] && c.Tokens[i] != c.ParamString {
18 c.Tokens[i] = c.ParamString
19 c.cache = ""
20 }
21 }
22 c.Size++
23}
24
25func (c *LogCluster) tokenDistance(tokens []string) (float64, int) {
26 if len(c.Tokens) != len(tokens) {

Calls

no outgoing calls