lib/sidekiq_prometheus.rb in sidekiq_prometheus-1.8.3 vs lib/sidekiq_prometheus.rb in sidekiq_prometheus-1.9.0

- old
+ new

@@ -40,10 +40,18 @@ attr_accessor :gc_metrics_enabled # @return [Boolean] Setting to control enabling/disabling global metrics. Default: true attr_accessor :global_metrics_enabled + # @return [Hash{Symbol => Array(Hash)}] Label sets that will be initiliazed when a metric is registered. + # @example + # { + # metric_name: [{label: 'value1', other_label: 'value1'}, {label: 'value1', other_label: 'value2'}], + # another_metric_name: [{label: 'value1', other_label: 'value1'}] + # } + attr_accessor :init_label_sets + # @return [Boolean] Setting to control enabling/disabling periodic metrics. Default: true attr_accessor :periodic_metrics_enabled # @return [Integer] Interval in seconds to record metrics. Default: 30 attr_accessor :periodic_reporting_interval @@ -80,9 +88,10 @@ self.metrics_host = "localhost" self.metrics_port = 9359 self.metrics_server_logger_enabled = true self.custom_labels = {} self.custom_metrics = [] + self.init_label_sets = {} module_function ## # @return Prometheus::Client