Class: PrometheusExporter::Ext::Instrumentation::BaseStats
- Inherits:
-
Object
- Object
- PrometheusExporter::Ext::Instrumentation::BaseStats
- Defined in:
- lib/prometheus_exporter/ext/instrumentation/base_stats.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #collect ⇒ Object
-
#initialize(client: PrometheusExporter::Client.default, labels: {}) ⇒ BaseStats
constructor
A new instance of BaseStats.
- #type ⇒ Object
Constructor Details
#initialize(client: PrometheusExporter::Client.default, labels: {}) ⇒ BaseStats
Returns a new instance of BaseStats.
12 13 14 15 |
# File 'lib/prometheus_exporter/ext/instrumentation/base_stats.rb', line 12 def initialize(client: PrometheusExporter::Client.default, labels: {}) @labels = labels.transform_keys(&:to_sym) @client = client end |
Class Attribute Details
.type ⇒ Object
Returns the value of attribute type.
9 10 11 |
# File 'lib/prometheus_exporter/ext/instrumentation/base_stats.rb', line 9 def type @type end |
Instance Method Details
#collect ⇒ Object
21 22 23 |
# File 'lib/prometheus_exporter/ext/instrumentation/base_stats.rb', line 21 def collect raise NotImplementedError end |
#type ⇒ Object
17 18 19 |
# File 'lib/prometheus_exporter/ext/instrumentation/base_stats.rb', line 17 def type self.class.type end |