Class: Puma::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/puma/plugin/yabeda_prometheus.rb

Instance Method Summary collapse

Instance Method Details

#on_prometheus_exporter_boot(&block) ⇒ Object



23
24
25
26
# File 'lib/puma/plugin/yabeda_prometheus.rb', line 23

def on_prometheus_exporter_boot(&block)
  @options[:prometheus_exporter_boot_hooks] ||= []
  @options[:prometheus_exporter_boot_hooks] << block
end

#prometheus_exporter_url(uri) ⇒ Object



15
16
17
# File 'lib/puma/plugin/yabeda_prometheus.rb', line 15

def prometheus_exporter_url(uri)
  @options[:prometheus_exporter_url] = uri
end

#prometheus_silence_logger(silence) ⇒ Object



19
20
21
# File 'lib/puma/plugin/yabeda_prometheus.rb', line 19

def prometheus_silence_logger(silence)
  @options[:prometheus_silence_logger] = silence
end