Class: Contrast::Agent::Telemetry::Event
- Includes:
- Utils
- Defined in:
- lib/contrast/agent/telemetry/event.rb
Overview
This class will hold the basic information for a Telemetry Event
Direct Known Subclasses
Instance Attribute Summary collapse
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize ⇒ Event
constructor
A new instance of Event.
- #path ⇒ Object
- #to_controlled_hash(**_args) ⇒ Object
Constructor Details
#initialize ⇒ Event
Returns a new instance of Event.
15 16 17 18 |
# File 'lib/contrast/agent/telemetry/event.rb', line 15 def initialize @tags = MetricsHash.new(String) @timestamp = Time.now.iso8601 end |
Instance Attribute Details
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
13 14 15 |
# File 'lib/contrast/agent/telemetry/event.rb', line 13 def @tags end |
Instance Method Details
#path ⇒ Object
20 21 22 |
# File 'lib/contrast/agent/telemetry/event.rb', line 20 def path '' end |
#to_controlled_hash(**_args) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/contrast/agent/telemetry/event.rb', line 24 def to_controlled_hash **_args { tags: @tags, timestamp: @timestamp, instance: Contrast::Agent::Telemetry::Base.instance_id, application: Contrast::Agent::Telemetry::Base.application_id } end |