Sha256: bc9f4f07bf0a274dcbaa40dc3e93e8bfe7508ff765a64ed2c945129141de37d1
Contents?: true
Size: 717 Bytes
Versions: 2
Compression:
Stored size: 717 Bytes
Contents
module Frankenstein # Mix-in to add #remove to Prometheus metrics module RemoveTimeSeries # Remove a time series from a metric. # # @param labels [Hash<Symbol, String>] the label set to remove. # def remove(labels) @store.remove(labels) end # Mix-in to add #remove support to the default Synchronized metric store. module SynchronizedMetricStore # Remove a time series from the metric store. # # @private def remove(labels) @internal_store.delete(labels) end end end end Prometheus::Client::Metric.include(Frankenstein::RemoveTimeSeries) Prometheus::Client::DataStores::Synchronized.const_get(:MetricStore).include(Frankenstein::RemoveTimeSeries::SynchronizedMetricStore)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
frankenstein-2.1.0 | lib/frankenstein/remove_time_series.rb |
frankenstein-2.0.0 | lib/frankenstein/remove_time_series.rb |