Sha256: 8b994ddceb1a945245b038f9f87bc624e46ced7f1d2645d57c4919bc56f00b48
Contents?: true
Size: 536 Bytes
Versions: 2
Compression:
Stored size: 536 Bytes
Contents
require 'fluent/plugin/prometheus' module Fluent class PrometheusFilter < Filter Plugin.register_filter('prometheus', self) include Fluent::Prometheus def initialize super @registry = ::Prometheus::Client.registry end def configure(conf) super labels = Fluent::Prometheus.parse_labels_elements(conf) @metrics = Fluent::Prometheus.parse_metrics_elements(conf, @registry, labels) end def filter_stream(tag, es) instrument(tag, es, @metrics) es end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fluent-plugin-prometheus-0.5.0 | lib/fluent/plugin/filter_prometheus.rb |
fluent-plugin-prometheus-0.4.0 | lib/fluent/plugin/filter_prometheus.rb |