Class: Railswatch::Models::CustomRecord
Instance Method Summary
collapse
Methods inherited from BaseRecord
#datetime, #datetime=, #datetimei, #datetimei=, #value
reset_storage_connection!
Instance Method Details
#duration ⇒ Object
8
9
10
|
# File 'lib/railswatch/models/custom_record.rb', line 8
def duration
duration_ms
end
|
#duration=(value) ⇒ Object
12
13
14
|
# File 'lib/railswatch/models/custom_record.rb', line 12
def duration=(value)
self.duration_ms = value
end
|
#payload_hash ⇒ Object
16
17
18
|
# File 'lib/railswatch/models/custom_record.rb', line 16
def payload_hash
{ 'duration' => duration_ms }
end
|
#record_hash ⇒ Object
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/railswatch/models/custom_record.rb', line 20
def record_hash
{
tag_name: tag_name,
namespace_name: namespace_name,
status: status,
datetimei: occurred_at.to_i,
datetime: occurred_at,
duration: duration_ms
}
end
|