Class: NewRelic::Agent::Transaction::SyntheticsSampleBuffer

Inherits:
TransactionSampleBuffer show all
Defined in:
lib/new_relic/agent/transaction/synthetics_sample_buffer.rb

Constant Summary

Constants inherited from TransactionSampleBuffer

TransactionSampleBuffer::SINGLE_BUFFER_MAX

Instance Attribute Summary

Attributes inherited from TransactionSampleBuffer

#samples

Instance Method Summary collapse

Methods inherited from TransactionSampleBuffer

#enabled?, #full?, #harvest_samples, #initialize, #max_capacity, #reset!, #store, #store_previous, #truncate_samples_if_needed, #visit_node

Constructor Details

This class inherits a constructor from NewRelic::Agent::Transaction::TransactionSampleBuffer

Instance Method Details

#allow_sample?(sample) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/new_relic/agent/transaction/synthetics_sample_buffer.rb', line 15

def allow_sample?(sample)
  !sample.synthetics_resource_id.nil?
end

#capacityObject



11
12
13
# File 'lib/new_relic/agent/transaction/synthetics_sample_buffer.rb', line 11

def capacity
  NewRelic::Agent.config[:'synthetics.traces_limit']
end

#truncate_samplesObject



19
20
21
# File 'lib/new_relic/agent/transaction/synthetics_sample_buffer.rb', line 19

def truncate_samples
  @samples.slice!(max_capacity..-1)
end