in lib/elastic_apm/metrics/metric.rb [55:68]
def collect
@mutex.synchronize do
collected = @value
return nil if collected.is_a?(Float) && !collected.finite?
@value = initial_value if reset_on_collect?
return nil if reset_on_collect? && collected == 0
collected
end
end