Class: OpenCensus::Trace::TimeEvent
- Inherits:
-
Object
- Object
- OpenCensus::Trace::TimeEvent
- Defined in:
- lib/opencensus/trace/time_event.rb
Overview
A time-stamped annotation or message event in the Span.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#time ⇒ Time
readonly
The time the event occurred.
Instance Method Summary collapse
-
#initialize(time: nil) ⇒ TimeEvent
constructor
Create a TimeEvent object.
Constructor Details
#initialize(time: nil) ⇒ TimeEvent
Create a TimeEvent object
33 34 35 |
# File 'lib/opencensus/trace/time_event.rb', line 33 def initialize time: nil @time = time || ::Time.now.utc end |
Instance Attribute Details
#time ⇒ Time (readonly)
The time the event occurred.
26 27 28 |
# File 'lib/opencensus/trace/time_event.rb', line 26 def time @time end |