Class: RubyZipkin::TraceSampler
- Inherits:
-
Object
- Object
- RubyZipkin::TraceSampler
- Defined in:
- lib/rubyzipkin/tracesampler.rb
Class Method Summary collapse
Class Method Details
.request_sample_rate(request) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/rubyzipkin/tracesampler.rb', line 5 def self.request_sample_rate(request) if request[RubyZipkin::ZipkinTraceHeader::FORCE_SAMPLE] #filter is matched in the request, thus ensure not fitereed by returning 100% tracing (unsampled) if request.body.matches(filter) return 1 end end #default at .01 Percent return 0.0001 end |