class Datadog::Sampling::SimpleMatcher

A Matcher that supports matching a span by operation name and/or service name.

Constants

MATCH_ALL

Returns `true` for case equality (===) with any object

Attributes

name[R]
service[R]

Public Class Methods

new(name: MATCH_ALL, service: MATCH_ALL) click to toggle source

@param name [String,Regexp,Proc] Matcher for case equality (===) with the span name, defaults to always match @param service [String,Regexp,Proc] Matcher for case equality (===) with the service name, defaults to always match

# File lib/ddtrace/sampling/matcher.rb, line 31
def initialize(name: MATCH_ALL, service: MATCH_ALL)
  @name = name
  @service = service
end

Public Instance Methods

match?(span) click to toggle source
# File lib/ddtrace/sampling/matcher.rb, line 36
def match?(span)
  name === span.name && service === span.service
end