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



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

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