Class: Instana::Trace::Samplers::Result
- Inherits:
-
Object
- Object
- Instana::Trace::Samplers::Result
- Defined in:
- lib/instana/samplers/result.rb
Constant Summary collapse
- EMPTY_HASH =
{}.freeze
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#tracestate ⇒ Object
readonly
Returns the value of attribute tracestate.
Instance Method Summary collapse
-
#initialize(decision:, tracestate:, attributes: nil) ⇒ Result
constructor
A new instance of Result.
-
#recording? ⇒ Boolean
Returns true if this span should record events, attributes, status, etc.
-
#sampled? ⇒ Boolean
Returns true if this span should be sampled.
Constructor Details
#initialize(decision:, tracestate:, attributes: nil) ⇒ Result
Returns a new instance of Result.
10 11 12 13 14 |
# File 'lib/instana/samplers/result.rb', line 10 def initialize(decision:, tracestate:, attributes: nil) @decision = decision @attributes = attributes.freeze || EMPTY_HASH @tracestate = tracestate end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
8 9 10 |
# File 'lib/instana/samplers/result.rb', line 8 def attributes @attributes end |
#tracestate ⇒ Object (readonly)
Returns the value of attribute tracestate.
8 9 10 |
# File 'lib/instana/samplers/result.rb', line 8 def tracestate @tracestate end |
Instance Method Details
#recording? ⇒ Boolean
Returns true if this span should record events, attributes, status, etc.
returns TRUE always
26 27 28 |
# File 'lib/instana/samplers/result.rb', line 26 def recording? true end |
#sampled? ⇒ Boolean
Returns true if this span should be sampled.
19 20 21 |
# File 'lib/instana/samplers/result.rb', line 19 def sampled? false end |