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.
Some ideas:
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.