Class: Fluent::Plugin::Prometheus::DataStore
- Inherits:
-
Object
- Object
- Fluent::Plugin::Prometheus::DataStore
- Defined in:
- lib/fluent/plugin/prometheus/data_store.rb
Overview
Stores all the data in simple hashes, one per metric. Each of these metrics synchronizes access to their hash, but multiple metrics can run observations concurrently.
Defined Under Namespace
Classes: InvalidStoreSettingsError
Constant Summary collapse
- DEFAULT_METRIC_SETTINGS =
{ topk: 0 }
Instance Method Summary collapse
Instance Method Details
#for_metric(metric_name, metric_type:, metric_settings: {}) ⇒ Object
25 26 27 28 29 |
# File 'lib/fluent/plugin/prometheus/data_store.rb', line 25 def for_metric(metric_name, metric_type:, metric_settings: {}) settings = DEFAULT_METRIC_SETTINGS.merge(metric_settings) validate_metric_settings(metric_settings: settings) MetricStore.new(metric_settings: settings) end |