Class: NewRelic::Agent::Sampler
- Inherits:
-
Object
- Object
- NewRelic::Agent::Sampler
- Defined in:
- lib/new_relic/agent/sampler.rb
Direct Known Subclasses
NewRelic::Agent::Samplers::CpuSampler, NewRelic::Agent::Samplers::DelayedJobSampler, NewRelic::Agent::Samplers::MemorySampler, NewRelic::Agent::Samplers::ObjectSampler
Defined Under Namespace
Classes: Unsupported
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#stats_engine ⇒ Object
Returns the value of attribute stats_engine.
Class Method Summary collapse
- .inherited(subclass) ⇒ Object
- .sampler_classes ⇒ Object
-
.supported_on_this_platform? ⇒ Boolean
Override with check.
-
.use_harvest_sampler? ⇒ Boolean
Override to use the periodic sampler instead of running the sampler on the minute during harvests.
Instance Method Summary collapse
-
#initialize(id) ⇒ Sampler
constructor
A new instance of Sampler.
- #poll ⇒ Object
Constructor Details
#initialize(id) ⇒ Sampler
Returns a new instance of Sampler.
43 44 45 |
# File 'lib/new_relic/agent/sampler.rb', line 43 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
21 22 23 |
# File 'lib/new_relic/agent/sampler.rb', line 21 def id @id end |
#stats_engine ⇒ Object
Returns the value of attribute stats_engine.
20 21 22 |
# File 'lib/new_relic/agent/sampler.rb', line 20 def stats_engine @stats_engine end |
Class Method Details
.inherited(subclass) ⇒ Object
24 25 26 |
# File 'lib/new_relic/agent/sampler.rb', line 24 def self.inherited(subclass) @sampler_classes << subclass end |
.sampler_classes ⇒ Object
39 40 41 |
# File 'lib/new_relic/agent/sampler.rb', line 39 def self.sampler_classes @sampler_classes end |
.supported_on_this_platform? ⇒ Boolean
Override with check. Called before instantiating.
29 30 31 |
# File 'lib/new_relic/agent/sampler.rb', line 29 def self.supported_on_this_platform? true end |
.use_harvest_sampler? ⇒ Boolean
Override to use the periodic sampler instead of running the sampler on the minute during harvests.
35 36 37 |
# File 'lib/new_relic/agent/sampler.rb', line 35 def self.use_harvest_sampler? true end |
Instance Method Details
#poll ⇒ Object
47 48 49 |
# File 'lib/new_relic/agent/sampler.rb', line 47 def poll raise "Implement in the subclass" end |