-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Some ideas:
slogsampling.ThresholdSamplingOption{
Rate: 100,
ByHash: func(r *slog.Record) []byte {
return []byte(r.Message)
},
}slogsampling.ThresholdSamplingOption{
Rate: 100,
ByHash: func(r *slog.Record) []byte {
return BloomFilter([]byte(r.Message))
},
}slogsampling.ThresholdSamplingOption{
Rate: 100,
ByAttributeKey: []string{"http", "request", "header", "cf-connecting-ip"},
}slogsampling.ThresholdSamplingOption{
Rate: 100,
BySource: true, // might be very costly to look for stacktrace
}slogsampling.ThresholdSamplingOption{
Rate: 100,
ByDistance: slogsampling.LevenshteinDistance(xxx), // just brainstorming - definitely a VERY bad idea 😁
}We have to keep track of hash/keys. A garbage collector must remove old entries in LRU or LFU manner.
The bloom filter could be embedded into the library on behalf of the developer.
Metadata
Metadata
Assignees
Labels
No labels