Class: OpenCensus::Stats::View
- Inherits:
-
Object
- Object
- OpenCensus::Stats::View
- Defined in:
- lib/opencensus/stats/view.rb
Overview
View
A View specifies an aggregation and a set of tag keys. The aggregation will be broken down by the unique set of matching tag values for each measure.
Instance Attribute Summary collapse
-
#aggregation ⇒ Aggregation
readonly
Associated aggregation definition instance.
-
#columns ⇒ Array<String>
readonly
Columns (a.k.a Tag Keys) to match with the associated Measure.
-
#description ⇒ String
readonly
Detailed description.
-
#measure ⇒ Measure
readonly
Associated measure definition instance.
-
#name ⇒ String
readonly
Name of the view.
-
#time ⇒ Time
readonly
View creation time.
Instance Method Summary collapse
-
#initialize(name:, measure:, aggregation:, columns:, description: nil) ⇒ View
constructor
Create instance of the view.
Constructor Details
#initialize(name:, measure:, aggregation:, columns:, description: nil) ⇒ View
Create instance of the view
42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/opencensus/stats/view.rb', line 42 def initialize \ name:, measure:, aggregation:, columns:, description: nil @name = name @measure = measure @aggregation = aggregation @columns = columns @description = description @time = Time.now.utc end |
Instance Attribute Details
#aggregation ⇒ Aggregation (readonly)
Returns Associated aggregation definition instance.
19 20 21 |
# File 'lib/opencensus/stats/view.rb', line 19 def aggregation @aggregation end |
#columns ⇒ Array<String> (readonly)
Columns (a.k.a Tag Keys) to match with the associated Measure. Measure will be recorded in a "greedy" way. That is, every view aggregates every measure. This is similar to doing a GROUPBY on view columns. Columns must be unique.
27 28 29 |
# File 'lib/opencensus/stats/view.rb', line 27 def columns @columns end |
#description ⇒ String (readonly)
Returns Detailed description.
30 31 32 |
# File 'lib/opencensus/stats/view.rb', line 30 def description @description end |
#measure ⇒ Measure (readonly)
Returns Associated measure definition instance.
16 17 18 |
# File 'lib/opencensus/stats/view.rb', line 16 def measure @measure end |
#name ⇒ String (readonly)
Returns Name of the view.
13 14 15 |
# File 'lib/opencensus/stats/view.rb', line 13 def name @name end |
#time ⇒ Time (readonly)
Returns View creation time.
33 34 35 |
# File 'lib/opencensus/stats/view.rb', line 33 def time @time end |