class Flipper::Instrumentation::StatsdSubscriber

Attributes

client[RW]

Public Instance Methods

update_counter(metric) click to toggle source
# File lib/flipper/instrumentation/statsd_subscriber.rb, line 20
def update_counter(metric)
  self.class.client.increment metric if self.class.client
end
update_timer(metric) click to toggle source
# File lib/flipper/instrumentation/statsd_subscriber.rb, line 14
def update_timer(metric)
  if self.class.client
    self.class.client.timing metric, (@duration * 1_000).round
  end
end