class Fluent::Plugin::PrometheusMetrics

PromMetricsAggregator aggregates multiples metrics exposed using Prometheus text-based format see github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md

Attributes

comments[W]
metrics[W]

Public Class Methods

new() click to toggle source
# File lib/fluent/plugin/prometheus_metrics.rb, line 9
def initialize
  @comments = []
  @metrics = []
end

Public Instance Methods

add_comment(comment) click to toggle source
# File lib/fluent/plugin/prometheus_metrics.rb, line 18
def add_comment(comment)
  @comments << comment
end
add_metric_value(value) click to toggle source
# File lib/fluent/plugin/prometheus_metrics.rb, line 22
def add_metric_value(value)
  @metrics << value
end
to_string() click to toggle source
# File lib/fluent/plugin/prometheus_metrics.rb, line 14
def to_string
  (@comments + @metrics).join("\n")
end