class Traces::Backend::Test::Span

A span which validates tag assignment.

def []= key, value

@parameter value [Object] The metadata value. Should be coercable to a string.
@parameter key [String] The metadata key.
Assign some metadata to the span.
def []= key, value
	unless key.is_a?(String) || key.is_a?(Symbol)
		raise ArgumentError, "Invalid attribute key (must be String or Symbol): #{key.inspect}!"
	end
	
	begin
		String(value)
	rescue
		raise ArgumentError, "Invalid attribute value (must be convertible to String): #{value.inspect}!"
	end
end

def initialize(context)

@parameter context [Context] The context in which the span is recorded.
Initialize a new span.
def initialize(context)
	@context = context
end