Class: PhobosPrometheus::Exporter
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- PhobosPrometheus::Exporter
- 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
-
#registry ⇒ Object
readonly
Returns the value of attribute registry.
Instance Method Summary collapse
-
#initialize ⇒ Exporter
constructor
A new instance of Exporter.
Constructor Details
#initialize ⇒ Exporter
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
#registry ⇒ Object (readonly)
Returns the value of attribute registry.
7 8 9 |
# File 'lib/phobos_prometheus/exporter.rb', line 7 def registry @registry end |