Class: FiberAudit::Runtime::Event
- Inherits:
-
Data
- Object
- Data
- FiberAudit::Runtime::Event
- Defined in:
- lib/fiber_audit/runtime/event.rb
Instance Attribute Summary collapse
-
#duration_ns ⇒ Object
readonly
Returns the value of attribute duration_ns.
-
#execution_context ⇒ Object
readonly
Returns the value of attribute execution_context.
-
#fiber_id ⇒ Object
readonly
Returns the value of attribute fiber_id.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#measurements ⇒ Object
readonly
Returns the value of attribute measurements.
-
#monotonic_ns ⇒ Object
readonly
Returns the value of attribute monotonic_ns.
-
#occurred_at ⇒ Object
readonly
Returns the value of attribute occurred_at.
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#thread_id ⇒ Object
readonly
Returns the value of attribute thread_id.
Instance Method Summary collapse
-
#initialize(kind:, source:, occurred_at:, monotonic_ns:, duration_ns: nil, operation: nil, location: nil, execution_context: :unknown, thread_id: nil, fiber_id: nil, measurements: {}) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(kind:, source:, occurred_at:, monotonic_ns:, duration_ns: nil, operation: nil, location: nil, execution_context: :unknown, thread_id: nil, fiber_id: nil, measurements: {}) ⇒ Event
Returns a new instance of Event.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/fiber_audit/runtime/event.rb', line 22 def initialize( kind:, source:, occurred_at:, monotonic_ns:, duration_ns: nil, operation: nil, location: nil, execution_context: :unknown, thread_id: nil, fiber_id: nil, measurements: {} ) super( kind: Validation.identifier(kind, 'kind'), source: Validation.identifier(source, 'source'), occurred_at: Validation.utc_time(occurred_at, 'occurred_at'), monotonic_ns: Validation.integer(monotonic_ns, 'monotonic_ns'), duration_ns: Validation.integer(duration_ns, 'duration_ns', allow_nil: true), operation: Validation.operation(operation, allow_nil: true), location: normalize_location(location), execution_context: normalize_context(execution_context), thread_id: Validation.integer(thread_id, 'thread_id', allow_nil: true), fiber_id: Validation.integer(fiber_id, 'fiber_id', allow_nil: true), measurements: normalize_measurements(measurements) ) end |
Instance Attribute Details
#duration_ns ⇒ Object (readonly)
Returns the value of attribute duration_ns
9 10 11 |
# File 'lib/fiber_audit/runtime/event.rb', line 9 def duration_ns @duration_ns end |
#execution_context ⇒ Object (readonly)
Returns the value of attribute execution_context
9 10 11 |
# File 'lib/fiber_audit/runtime/event.rb', line 9 def execution_context @execution_context end |
#fiber_id ⇒ Object (readonly)
Returns the value of attribute fiber_id
9 10 11 |
# File 'lib/fiber_audit/runtime/event.rb', line 9 def fiber_id @fiber_id end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
9 10 11 |
# File 'lib/fiber_audit/runtime/event.rb', line 9 def kind @kind end |
#location ⇒ Object (readonly)
Returns the value of attribute location
9 10 11 |
# File 'lib/fiber_audit/runtime/event.rb', line 9 def location @location end |
#measurements ⇒ Object (readonly)
Returns the value of attribute measurements
9 10 11 |
# File 'lib/fiber_audit/runtime/event.rb', line 9 def measurements @measurements end |
#monotonic_ns ⇒ Object (readonly)
Returns the value of attribute monotonic_ns
9 10 11 |
# File 'lib/fiber_audit/runtime/event.rb', line 9 def monotonic_ns @monotonic_ns end |
#occurred_at ⇒ Object (readonly)
Returns the value of attribute occurred_at
9 10 11 |
# File 'lib/fiber_audit/runtime/event.rb', line 9 def occurred_at @occurred_at end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation
9 10 11 |
# File 'lib/fiber_audit/runtime/event.rb', line 9 def operation @operation end |
#source ⇒ Object (readonly)
Returns the value of attribute source
9 10 11 |
# File 'lib/fiber_audit/runtime/event.rb', line 9 def source @source end |
#thread_id ⇒ Object (readonly)
Returns the value of attribute thread_id
9 10 11 |
# File 'lib/fiber_audit/runtime/event.rb', line 9 def thread_id @thread_id end |