Class: Atatus::TraceContext::Tracestate::EsEntry Private
- Inherits:
-
Object
- Object
- Atatus::TraceContext::Tracestate::EsEntry
- Defined in:
- lib/atatus/trace_context/tracestate.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- ASSIGN =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
':'- SPLIT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
';'- SHORT_TO_LONG =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ 's' => 'sample_rate' }
- LONG_TO_SHORT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ 'sample_rate' => 's' }
Instance Attribute Summary collapse
- #sample_rate ⇒ Object private
Instance Method Summary collapse
- #empty? ⇒ Boolean private
-
#initialize(values = nil) ⇒ EsEntry
constructor
private
A new instance of EsEntry.
- #key ⇒ Object private
- #to_s ⇒ Object private
- #value ⇒ Object private
Constructor Details
#initialize(values = nil) ⇒ EsEntry
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of EsEntry.
45 46 47 |
# File 'lib/atatus/trace_context/tracestate.rb', line 45 def initialize(values = nil) parse(values) end |
Instance Attribute Details
#sample_rate ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
49 50 51 |
# File 'lib/atatus/trace_context/tracestate.rb', line 49 def sample_rate @sample_rate end |
Instance Method Details
#empty? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
61 62 63 |
# File 'lib/atatus/trace_context/tracestate.rb', line 61 def empty? !sample_rate end |
#key ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
51 52 53 |
# File 'lib/atatus/trace_context/tracestate.rb', line 51 def key 'es' end |
#to_s ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
75 76 77 78 79 |
# File 'lib/atatus/trace_context/tracestate.rb', line 75 def to_s return nil if empty? "es=#{value}" end |
#value ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
55 56 57 58 59 |
# File 'lib/atatus/trace_context/tracestate.rb', line 55 def value LONG_TO_SHORT.map do |l, s| "#{s}#{ASSIGN}#{send(l)}" end.join(SPLIT) end |