mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Add usage tracking
This commit is contained in:
@@ -421,6 +421,7 @@ module Liquid
|
||||
|
||||
def default(input, default_value = ''.freeze)
|
||||
if !input || input.respond_to?(:empty?) && input.empty?
|
||||
Usage.increment("liquid.default_filter_received_false_value") if input == false # See https://github.com/Shopify/liquid/issues/1127
|
||||
default_value
|
||||
else
|
||||
input
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
module Liquid
|
||||
module Usage
|
||||
def self.increment(name, sample_rate: 0.1, tags: {})
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user