Class: Tracebin::SystemHealthSample
- Inherits:
-
Object
- Object
- Tracebin::SystemHealthSample
- Defined in:
- lib/tracebin/system_health_sample.rb
Constant Summary collapse
- DATA_TYPE =
'system_health_sample'.freeze
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SystemHealthSample
constructor
A new instance of SystemHealthSample.
- #payload ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ SystemHealthSample
Returns a new instance of SystemHealthSample.
5 6 7 8 9 |
# File 'lib/tracebin/system_health_sample.rb', line 5 def initialize( = {}) @process = [:process] || :web @sampled_at = Time.new @metrics = sample_metrics end |
Instance Method Details
#payload ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/tracebin/system_health_sample.rb', line 11 def payload { type: DATA_TYPE, data: { sampled_at: @sampled_at, metrics: @metrics } } end |