class Traces::Backend::Capture::Span
A span which validates tag assignment.
def []= key, value
@parameter key [String] The metadata key.
Assign some metadata to the span.
def []= key, value @attributes[key] = value end
def as_json
def as_json { name: @name, resource: @resource, attributes: @attributes, context: @context.as_json } end
def initialize(context, name, resource, attributes)
@parameter resource [String] The "resource" that the span is associated with.
@parameter name [String] A useful name/annotation for the recorded span.
@parameter context [Context] The context in which the span is recorded.
Initialize a new span.
def initialize(context, name, resource, attributes) @context = context @name = name @resource = resource @attributes = attributes end
def to_json(...)
def to_json(...) as_json.to_json(...) end