Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Currently, trace_opts.go provides a function to set sampler with signature func WithSampler(samplingRate float64) TracerOption . I hope it can provide another function like func WithSampler(sampler Sampler) TracerOption, then I can set my customized sampler.
At the same time, the RandomSampler has a little bug:
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] Currently,
trace_opts.go
provides a function to set sampler with signaturefunc WithSampler(samplingRate float64) TracerOption
. I hope it can provide another function likefunc WithSampler(sampler Sampler) TracerOption
, then I can set my customized sampler. At the same time, theRandomSampler
has a little bug:It should be
s.threshold > s.rand.Intn(100)
.Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.