Sha256: bccb62af40679588035971bd75b85a8a471088c31dbcd286ab4801aca38f19e0
Contents?: true
Size: 585 Bytes
Versions: 34
Compression:
Stored size: 585 Bytes
Contents
module Honeybadger class Registry def initialize @mutex = Mutex.new @metrics = Hash.new end def register(metric) @mutex.synchronize do @metrics[metric.signature] = metric end end def get(metric_type, name, attributes) @mutex.synchronize do @metrics[Honeybadger::Metric.signature(metric_type, name, attributes)] end end def flush @mutex.synchronize do @metrics = Hash.new end end def metrics @mutex.synchronize do @metrics.values end end end end
Version data entries
34 entries across 34 versions & 1 rubygems