Class: Traces::Backend::Console::Span
- Inherits:
-
Object
- Object
- Traces::Backend::Console::Span
- Defined in:
- lib/traces/backend/console.rb
Overview
A span which validates tag assignment.
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
-
#[]=(key, value) ⇒ Object
Assign some metadata to the span.
-
#initialize(context, name) ⇒ Span
constructor
Initialize a new span.
- #The context in which the span is recorded.=(context) ⇒ Object
Constructor Details
#initialize(context, name) ⇒ Span
Initialize a new span.
22 23 24 25 |
# File 'lib/traces/backend/console.rb', line 22 def initialize(context, name) @context = context @name = name end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
28 29 30 |
# File 'lib/traces/backend/console.rb', line 28 def context @context end |
Instance Method Details
#[]=(key, value) ⇒ Object
Assign some metadata to the span.
33 34 35 |
# File 'lib/traces/backend/console.rb', line 33 def []= key, value ::Console.logger.info(@context, @name, "#{key} = #{value}") end |
#The context in which the span is recorded.=(context) ⇒ Object
28 |
# File 'lib/traces/backend/console.rb', line 28 attr :context |