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.
38 39 40 41 42 |
# File 'lib/traces/backend/console.rb', line 38 def initialize(context, instance, name) @context = context @instance = instance @name = name end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
44 45 46 |
# File 'lib/traces/backend/console.rb', line 44 def context @context end |
Instance Method Details
#[]=(key, value) ⇒ Object
Assign some metadata to the span.
49 50 51 |
# File 'lib/traces/backend/console.rb', line 49 def []= key, value ::Console.logger.info(@context, @name, "#{key} = #{value}") end |