Class: Tracekit::Metrics::Histogram
- Inherits:
-
Object
- Object
- Tracekit::Metrics::Histogram
- Defined in:
- lib/tracekit/metrics/histogram.rb
Overview
Histogram metric - records distribution of values Used for tracking request durations, payload sizes, etc.
Instance Method Summary collapse
-
#initialize(name, tags, registry) ⇒ Histogram
constructor
A new instance of Histogram.
-
#record(value) ⇒ Object
Records a value in the histogram.
Constructor Details
#initialize(name, tags, registry) ⇒ Histogram
Returns a new instance of Histogram.
8 9 10 11 12 |
# File 'lib/tracekit/metrics/histogram.rb', line 8 def initialize(name, , registry) @name = name @tags = || {} @registry = registry end |
Instance Method Details
#record(value) ⇒ Object
Records a value in the histogram
16 17 18 |
# File 'lib/tracekit/metrics/histogram.rb', line 16 def record(value) @registry.record_metric(@name, "histogram", value, @tags) end |