lib/influxdb/rails/middleware/render_subscriber.rb in influxdb-rails-1.0.0.beta2 vs lib/influxdb/rails/middleware/render_subscriber.rb in influxdb-rails-1.0.0.beta3

- old
+ new

@@ -4,16 +4,22 @@ module Rails module Middleware class RenderSubscriber < SimpleSubscriber # :nodoc: private - def tags(payload) - { - location: location, - filename: payload[:identifier], + def values(started, finished, payload) + super(started, finished, payload).merge( count: payload[:count], - cache_hits: payload[:cache_hits], - }.reject { |_, value| value.blank? } + cache_hits: payload[:cache_hits] + ).reject { |_, value| value.nil? } + end + + def tags(payload) + tags = { + location: location, + filename: payload[:identifier], + } + super(tags) end end end end end