class Metrics::Backend::Test::Metric
def emit(value, tags: nil, sample_rate: 1.0)
def emit(value, tags: nil, sample_rate: 1.0) unless value.is_a?(Numeric) raise ArgumentError, "Value must be numeric!" end tags&.each do |tag| raise ArgumentError, "Invalid tag (must be String): #{tag.inspect}!" unless tag.is_a?(String) # We should let the underlying backend handle any tag limitations, e.g. converting invalid characters to underscores, etc. # # unless tag =~ VALID_TAG # raise ArgumentError, "Invalid tag (must match #{VALID_TAG}): #{tag.inspect}!" # end end end