Class: Sidekiq::Prometheus::Exporter::Standard

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq/prometheus/exporter/standard.rb

Defined Under Namespace

Classes: QueueStats, QueueWorkersStats, WorkersStats

Constant Summary collapse

TEMPLATE =
ERB.new(File.read(File.expand_path('templates/standard.erb', __dir__)))

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStandard

Returns a new instance of Standard.



20
21
22
23
24
25
# File 'lib/sidekiq/prometheus/exporter/standard.rb', line 20

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

Class Method Details

.available?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/sidekiq/prometheus/exporter/standard.rb', line 16

def self.available?
  true
end

Instance Method Details

#to_sObject



27
28
29
# File 'lib/sidekiq/prometheus/exporter/standard.rb', line 27

def to_s
  TEMPLATE.result(binding).chomp!
end