Class: PhobosPrometheus::Exporter

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/phobos_prometheus/exporter.rb

Overview

Exporter is a Rack application that provides a Prometheus HTTP exposition endpoint.

Constant Summary collapse

FORMATS =
[Prometheus::Client::Formats::Text].freeze
FALLBACK =
Prometheus::Client::Formats::Text

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeExporter

Returns a new instance of Exporter.



12
13
14
15
16
# File 'lib/phobos_prometheus/exporter.rb', line 12

def initialize
  super
  @registry = Prometheus::Client.registry
  @acceptable = ExporterHelper.build_dictionary(FORMATS, FALLBACK)
end

Instance Attribute Details

#registryObject (readonly)

Returns the value of attribute registry.



7
8
9
# File 'lib/phobos_prometheus/exporter.rb', line 7

def registry
  @registry
end