class OneApm::TransactionSampleBuilder::PlaceholderSegment
Once we hit the TT segment limit, we use this class to hold our place in the tree so that we can still get accurate names and times on the segments we've already created. The placeholder segment keeps a depth counter that's incremented on each segment entry, and decremented on exit, until it reaches zero, when we throw the placeholder away. There should only ever be zero or one placeholder segment at a time.
@api private
Attributes
depth[RW]
parent_segment[R]
Public Class Methods
new(parent_segment)
click to toggle source
# File lib/one_apm/transaction/transaction_sample_builder.rb, line 27 def initialize(parent_segment) @parent_segment = parent_segment @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 segments.
# File lib/one_apm/transaction/transaction_sample_builder.rb, line 34 def [](key); end
[]=(key, value)
click to toggle source
# File lib/one_apm/transaction/transaction_sample_builder.rb, line 35 def []=(key, value); end
params()
click to toggle source
Stubbed out in case clients try to touch params directly.
# File lib/one_apm/transaction/transaction_sample_builder.rb, line 38 def params; {}; end
params=()
click to toggle source
# File lib/one_apm/transaction/transaction_sample_builder.rb, line 39 def params=; end