class Sqreen::Ecosystem::Tracing::Sampler
Constants
- PRIMITIVES_MAP
Public Class Methods
new(definition)
click to toggle source
@param [Array<Hash{String=>Object}>] definition
# File lib/sqreen/ecosystem/tracing/sampler.rb, line 17 def initialize(definition) @lines = definition.map { |h| Line.new(h) } end
Public Instance Methods
should_sample?()
click to toggle source
# File lib/sqreen/ecosystem/tracing/sampler.rb, line 21 def should_sample? line = @lines.find(&:triggers?) line ? line.saved_definition : false end