class Datadog::Sampling::ProcMatcher
A Matcher that allows for arbitrary span matching based on the return value of a provided block.
Attributes
block[R]
Public Class Methods
new(&block)
click to toggle source
@yield [name, service] Provides span name and service to the block @yieldreturn [Boolean] Whether the span conforms to this matcher
# File lib/ddtrace/sampling/matcher.rb, line 48 def initialize(&block) @block = block end
Public Instance Methods
match?(span)
click to toggle source
# File lib/ddtrace/sampling/matcher.rb, line 52 def match?(span) block.call(span.name, span.service) end