Class: Sentry::Transaction::SpanRecorder
- Inherits:
-
Object
- Object
- Sentry::Transaction::SpanRecorder
- Defined in:
- lib/sentry/transaction.rb
Instance Attribute Summary collapse
-
#max_length ⇒ Object
readonly
Returns the value of attribute max_length.
-
#spans ⇒ Object
readonly
Returns the value of attribute spans.
Instance Method Summary collapse
- #add(span) ⇒ Object
-
#initialize(max_length) ⇒ SpanRecorder
constructor
A new instance of SpanRecorder.
Constructor Details
#initialize(max_length) ⇒ SpanRecorder
Returns a new instance of SpanRecorder.
349 350 351 352 |
# File 'lib/sentry/transaction.rb', line 349 def initialize(max_length) @max_length = max_length @spans = [] end |
Instance Attribute Details
#max_length ⇒ Object (readonly)
Returns the value of attribute max_length.
347 348 349 |
# File 'lib/sentry/transaction.rb', line 347 def max_length @max_length end |
#spans ⇒ Object (readonly)
Returns the value of attribute spans.
347 348 349 |
# File 'lib/sentry/transaction.rb', line 347 def spans @spans end |
Instance Method Details
#add(span) ⇒ Object
354 355 356 357 358 |
# File 'lib/sentry/transaction.rb', line 354 def add(span) if @spans.count < @max_length @spans << span end end |