Sha256: 3b681d30d8b69658f83fe829f6b4cda182ae539ccc5eb5fa87ff03a707dd2329

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

# frozen_string_literal: true

require 'sidekiq/api'

module Sidekiq
  module Prometheus
    class Metrics
      QueueStats = Struct.new(:name, :size, :latency)

      def initialize
        @overview_stats = Sidekiq::Stats.new
        @queues_stats = queues_stats
      end

      def __binding__
        binding
      end

      private

      def queues_stats
        Sidekiq::Queue.all.map do |queue|
          QueueStats.new(queue.name, queue.size, queue.latency)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sidekiq-prometheus-exporter-0.1.6 lib/sidekiq/prometheus/exporter/metrics.rb