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, instance, name) ⇒ Span
constructor
A new instance of Span.
Constructor Details
#initialize(context, instance, name) ⇒ Span
Returns a new instance of Span.
21 22 23 24 25 |
# File 'lib/traces/backend/console.rb', line 21 def initialize(context, instance, name) @context = context @instance = instance @name = name end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
27 28 29 |
# File 'lib/traces/backend/console.rb', line 27 def context @context end |
Instance Method Details
#[]=(key, value) ⇒ Object
Assign some metadata to the span.
32 33 34 |
# File 'lib/traces/backend/console.rb', line 32 def []= key, value ::Console.logger.info(@context, @name, "#{key} = #{value}") end |