Class: OpenCensus::Stats::Measurement
- Inherits:
-
Object
- Object
- OpenCensus::Stats::Measurement
- Defined in:
- lib/opencensus/stats/measurement.rb
Overview
Measurement
Describes a data point to be collected for a Measure.
Instance Attribute Summary collapse
-
#measure ⇒ Measure
readonly
A measure to which the value is applied.
-
#tags ⇒ TagMap
readonly
The tags to which the value is applied.
-
#time ⇒ Time
readonly
The time when measurement was created.
-
#value ⇒ Integer, Float
readonly
The recorded value.
Instance Method Summary collapse
-
#initialize(measure:, value:, tags:) ⇒ Measurement
constructor
Create a instance of measurement.
Constructor Details
#initialize(measure:, value:, tags:) ⇒ Measurement
Create a instance of measurement
27 28 29 30 31 32 |
# File 'lib/opencensus/stats/measurement.rb', line 27 def initialize measure:, value:, tags: @measure = measure @value = value @tags = Tags::TagMap.new @time = Time.now.utc end |
Instance Attribute Details
#measure ⇒ Measure (readonly)
Returns A measure to which the value is applied.
11 12 13 |
# File 'lib/opencensus/stats/measurement.rb', line 11 def measure @measure end |
#tags ⇒ TagMap (readonly)
Returns The tags to which the value is applied.
17 18 19 |
# File 'lib/opencensus/stats/measurement.rb', line 17 def @tags end |
#time ⇒ Time (readonly)
Returns The time when measurement was created.
20 21 22 |
# File 'lib/opencensus/stats/measurement.rb', line 20 def time @time end |
#value ⇒ Integer, Float (readonly)
Returns The recorded value.
14 15 16 |
# File 'lib/opencensus/stats/measurement.rb', line 14 def value @value end |