class Fluent::Plugin::PrometheusFilter

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/fluent/plugin/filter_prometheus.rb, line 10
def initialize
  super
  @registry = ::Prometheus::Client.registry
end

Public Instance Methods

configure(conf) click to toggle source
Calls superclass method Fluent::Plugin::Prometheus#configure
# File lib/fluent/plugin/filter_prometheus.rb, line 19
def configure(conf)
  super
  labels = parse_labels_elements(conf)
  @metrics = Fluent::Plugin::Prometheus.parse_metrics_elements(conf, @registry, labels)
end
filter(tag, time, record) click to toggle source
# File lib/fluent/plugin/filter_prometheus.rb, line 25
def filter(tag, time, record)
  instrument_single(tag, time, record, @metrics)
  record
end
multi_workers_ready?() click to toggle source
# File lib/fluent/plugin/filter_prometheus.rb, line 15
def multi_workers_ready?
  true
end