Sha256: 895f2fa7d848732aefdab56d120047d1233db5985a4f57b3ad22d787a5524a2d

Contents?: true

Size: 765 Bytes

Versions: 28

Compression:

Stored size: 765 Bytes

Contents

require 'honeybadger/instrumentation_helper'
require 'honeybadger/plugin'

module Honeybadger
  module Plugins
    module Autotuner
      Plugin.register :autotuner do
        requirement { config.load_plugin_insights?(:autotuner) && defined?(::Autotuner) }

        execution do
          singleton_class.include(Honeybadger::InstrumentationHelper)

          ::Autotuner.enabled = true

          ::Autotuner.reporter = proc do |report|
            Honeybadger.event("report.autotuner", report: report.to_s)
          end

          metric_source 'autotuner'

          ::Autotuner.metrics_reporter = proc do |metrics|
            metrics.each do |key, val|
              gauge key, ->{ val }
            end
          end
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
honeybadger-5.22.0 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.21.0 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.20.1 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.20.0 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.19.2 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.19.1 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.19.0 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.18.0 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.17.0 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.16.0 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.15.6 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.15.5 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.15.4 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.15.3 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.15.2 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.15.1 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.15.0 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.14.2 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.14.1 lib/honeybadger/plugins/autotuner.rb
honeybadger-5.14.0 lib/honeybadger/plugins/autotuner.rb