fingerprinter

package
v0.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2026 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	LogLevelPlaceHolder   = "<Loglevel>"
	IdentifierPlaceHolder = "<Identifier>"
)

Variables

This section is empty.

Functions

func CalculateSpanFingerprint added in v0.25.2

func CalculateSpanFingerprint(res pcommon.Resource, sr ptrace.Span) int64

func ComputeExemplarKey added in v0.30.2

func ComputeExemplarKey(rl pcommon.Resource, extraKeys []string) ([]string, int64)

func Fingerprint added in v0.30.9

func Fingerprint(input string, clusterManager *TrieClusterManager) (fingerprint int64, level string, js map[string]any, err error)

func GetExceptionMessage added in v0.25.6

func GetExceptionMessage(sr ptrace.Span) string

func GetFingerprintAttribute added in v0.30.2

func GetFingerprintAttribute(l pcommon.Map) int64

func GetFromResource added in v0.30.2

func GetFromResource(attr pcommon.Map, key string) string

func GetStringAttribute added in v0.30.13

func GetStringAttribute(sr ptrace.Span, key string) string

func NewFingerprinter

func NewFingerprinter(opts ...Option) *fingerprinterImpl

Types

type Fingerprinter

type Fingerprinter interface {
	IsWord(word string) bool
	Fingerprint(input string, clusterManager *TrieClusterManager) (fingerprint int64, level string, js map[string]any, err error)
	TokenizeInput(input string) (*TokenSeq, string, map[string]any, error)
}

type Option added in v0.4.1

type Option func(*fingerprinterImpl)

func WithMaxTokens added in v0.4.1

func WithMaxTokens(maxlen int) Option

type TokenSeq added in v0.25.1

type TokenSeq struct {
	Index    int
	Items    []string
	JsonKeys []string
}

TokenSeq represents a sequence of tokens extracted from log input. Items contains the tokenized pattern elements (e.g., ["<Loglevel>", "received", "<Path>"]). JsonKeys contains the dot-notation paths of any JSON keys found in the input.

type TrieClusterManager added in v0.25.1

type TrieClusterManager struct {
	// contains filtered or unexported fields
}

TrieClusterManager maps full token-prefixes to per-node leafClusterers.

func NewTrieClusterManager added in v0.25.1

func NewTrieClusterManager(threshold float64) *TrieClusterManager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL