class NewRelic::Agent::TransactionSampleBuilder::PlaceholderNode
Once we hit the TT node limit, we use this class to hold our place in the tree so that we can still get accurate names and times on the nodes we've already created. The placeholder node keeps a depth counter that's incremented on each node entry, and decremented on exit, until it reaches zero, when we throw the placeholder away. There should only ever be zero or one placeholder node at a time.
@api private
Attributes
depth[RW]
parent_node[R]
Public Class Methods
new(parent_node)
click to toggle source
# File lib/new_relic/agent/transaction_sample_builder.rb, line 29 def initialize(parent_node) @parent_node = parent_node @depth = 1 end
Public Instance Methods
[](key)
click to toggle source
No-op - some clients expect to be able to use these to read/write params on TT nodes.
# File lib/new_relic/agent/transaction_sample_builder.rb, line 36 def [](key); end
[]=(key, value)
click to toggle source
# File lib/new_relic/agent/transaction_sample_builder.rb, line 37 def []=(key, value); end
params()
click to toggle source
Stubbed out in case clients try to touch params directly.
# File lib/new_relic/agent/transaction_sample_builder.rb, line 40 def params; {}; end
params=()
click to toggle source
# File lib/new_relic/agent/transaction_sample_builder.rb, line 41 def params=; end