Sha256: dbf9931a9003ea4b849a8df4dfc5bd8812f1fffcc33da55a5cca707b66aa2ff2
Contents?: true
Size: 812 Bytes
Versions: 12
Compression:
Stored size: 812 Bytes
Contents
module Honeybadger class RegistryExecution def initialize(registry, config, options) @registry = registry @config = config @options = options @interval = config[:'insights.registry_flush_interval'] || options.fetch(:interval, 60) @end_time = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC) + @interval end def tick @end_time - ::Process.clock_gettime(::Process::CLOCK_MONOTONIC) end def reset @end_time = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC) + @interval @registry.flush end def call @registry.metrics.each do |metric| next if metric.samples == 0 metric.event_payloads.each do |payload| Honeybadger.event(payload.merge(interval: @interval)) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems