class OpenTelemetry::Trace::Link

and its attributes are immutable.
A Link can be also used to reference spans from the same trace. A Link
single batch handler processes multiple requests from different traces.
A link to a {Span}. Used (for example) in batching operations, where a

def ==(other)

Returns true if two {Link}s are equal.
def ==(other)
  other.span_context == @span_context && other.attributes == @attributes
end

def initialize(span_context, attributes = nil)

Returns:
  • (Link) -

Parameters:
  • (optional Hash{String => String, Numeric, Boolean, Array}) --
  • span_context (SpanContext) -- The context of the linked {Span}.
def initialize(span_context, attributes = nil)
  @span_context = span_context
  @attributes = attributes.freeze || EMPTY_ATTRIBUTES
end