lib/opentelemetry/trace/link.rb in opentelemetry-api-0.7.0 vs lib/opentelemetry/trace/link.rb in opentelemetry-api-0.8.0

- old
+ new

@@ -16,11 +16,11 @@ private_constant :EMPTY_ATTRIBUTES # Returns the {SpanContext} for this link # # @return [SpanContext] - attr_reader :context + attr_reader :span_context # Returns the frozen attributes for this link. # # @return [Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}] attr_reader :attributes @@ -31,16 +31,16 @@ # @param [optional Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}] # attributes A hash of attributes for this link. Attributes will be # frozen during Link initialization. # @return [Link] def initialize(span_context, attributes = nil) - @context = span_context + @span_context = span_context @attributes = attributes.freeze || EMPTY_ATTRIBUTES end # Returns true if two {Link}s are equal. def ==(other) - other.context == @context && other.attributes == @attributes + other.span_context == @span_context && other.attributes == @attributes end end end end