Class: OpenCensus::Trace::Annotation
- Defined in:
- lib/opencensus/trace/annotation.rb
Overview
A text annotation with a set of attributes.
Instance Attribute Summary collapse
-
#attributes ⇒ Hash<String, (TruncatableString, Integer, Boolean)>
readonly
A set of attributes on the annotation.
-
#description ⇒ TruncatableString
readonly
A user-supplied message describing the event.
-
#dropped_attributes_count ⇒ Integer
readonly
The number of attributes that were discarded.
Attributes inherited from TimeEvent
Instance Method Summary collapse
-
#initialize(description, attributes: {}, dropped_attributes_count: 0, time: nil) ⇒ Annotation
constructor
Create an Annotation object.
Constructor Details
#initialize(description, attributes: {}, dropped_attributes_count: 0, time: nil) ⇒ Annotation
Create an Annotation object.
51 52 53 54 55 56 57 |
# File 'lib/opencensus/trace/annotation.rb', line 51 def initialize description, attributes: {}, dropped_attributes_count: 0, time: nil super time: time @description = description @attributes = attributes @dropped_attributes_count = dropped_attributes_count end |
Instance Attribute Details
#attributes ⇒ Hash<String, (TruncatableString, Integer, Boolean)> (readonly)
A set of attributes on the annotation.
35 36 37 |
# File 'lib/opencensus/trace/annotation.rb', line 35 def attributes @attributes end |
#description ⇒ TruncatableString (readonly)
A user-supplied message describing the event.
28 29 30 |
# File 'lib/opencensus/trace/annotation.rb', line 28 def description @description end |
#dropped_attributes_count ⇒ Integer (readonly)
The number of attributes that were discarded. Attributes can be discarded because their keys are too long or because there are too many attributes. If this value is 0, then no attributes were dropped.
44 45 46 |
# File 'lib/opencensus/trace/annotation.rb', line 44 def dropped_attributes_count @dropped_attributes_count end |