File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ Sampling fixes throughput by dropping repetitive log entries.
22
22
- [ slog-gin] ( https://github.com/samber/slog-gin ) : Gin middleware for ` slog ` logger
23
23
- [ slog-echo] ( https://github.com/samber/slog-echo ) : Echo middleware for ` slog ` logger
24
24
- [ slog-fiber] ( https://github.com/samber/slog-fiber ) : Fiber middleware for ` slog ` logger
25
+ - [ slog-chi] ( https://github.com/samber/slog-chi ) : Chi middleware for ` slog ` logger
25
26
- [ slog-datadog] ( https://github.com/samber/slog-datadog ) : A ` slog ` handler for ` Datadog `
26
27
- [ slog-rollbar] ( https://github.com/samber/slog-rollbar ) : A ` slog ` handler for ` Rollbar `
27
28
- [ slog-sentry] ( https://github.com/samber/slog-sentry ) : A ` slog ` handler for ` Sentry `
@@ -66,13 +67,10 @@ The sampling middleware can be used standalone or with `slog-multi` helper.
66
67
67
68
``` go
68
69
type UniformSamplingOption struct {
69
- // This will log the first `Threshold` log entries with the same level and message
70
- // in a `Tick` interval as-is. Following that, it will allow `Rate` in the range [0.0, 1.0].
71
- Tick time.Duration
72
- Threshold uint64
73
- Rate float64
70
+ // The sample rate for sampling traces in the range [0.0, 1.0].
71
+ Rate float64
74
72
75
- // Optional hooks
73
+ // Optional hooks
76
74
OnAccepted func (context.Context , slog.Record )
77
75
OnDropped func (context.Context , slog.Record )
78
76
}
You can’t perform that action at this time.
0 commit comments