lib/opentelemetry/sdk/trace/span.rb in opentelemetry-sdk-0.7.0 vs lib/opentelemetry/sdk/trace/span.rb in opentelemetry-sdk-0.8.0
- old
+ new
@@ -292,10 +292,10 @@
links.last(max_links_count).map! do |link|
attrs = Hash[link.attributes] # link.attributes is frozen, so we need an unfrozen copy to adjust.
attrs.keep_if { |key, value| Internal.valid_key?(key) && Internal.valid_value?(value) }
excess = attrs.size - max_attributes_per_link
excess.times { attrs.shift } if excess.positive?
- OpenTelemetry::Trace::Link.new(link.context, attrs)
+ OpenTelemetry::Trace::Link.new(link.span_context, attrs)
end.freeze
end
def append_event(events, event) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
max_events_count = @trace_config.max_events_count