lib/opentelemetry/sdk/trace/span.rb in opentelemetry-sdk-0.4.0 vs lib/opentelemetry/sdk/trace/span.rb in opentelemetry-sdk-0.5.0
- old
+ new
@@ -16,11 +16,11 @@
#
# rubocop:disable Metrics/ClassLength
class Span < OpenTelemetry::Trace::Span
# The following readers are intended for the use of SpanProcessors and
# should not be considered part of the public interface for instrumentation.
- attr_reader :name, :status, :kind, :parent_span_id, :start_timestamp, :end_timestamp, :links, :library_resource
+ attr_reader :name, :status, :kind, :parent_span_id, :start_timestamp, :end_timestamp, :links, :library_resource, :instrumentation_library
# Return a frozen copy of the current attributes. This is intended for
# use of SpanProcesses and should not be considered part of the public
# interface for instrumentation.
#
@@ -235,25 +235,28 @@
@end_timestamp,
@attributes,
@links,
@events,
@library_resource,
+ @instrumentation_library,
context.span_id,
context.trace_id,
- context.trace_flags
+ context.trace_flags,
+ context.tracestate
)
end
# @api private
- def initialize(context, name, kind, parent_span_id, trace_config, span_processor, attributes, links, start_timestamp, library_resource) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
+ def initialize(context, name, kind, parent_span_id, trace_config, span_processor, attributes, links, start_timestamp, library_resource, instrumentation_library) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
super(span_context: context)
@mutex = Mutex.new
@name = name
@kind = kind
@parent_span_id = parent_span_id.freeze || OpenTelemetry::Trace::INVALID_SPAN_ID
@trace_config = trace_config
@span_processor = span_processor
@library_resource = library_resource
+ @instrumentation_library = instrumentation_library
@ended = false
@status = nil
@child_count = 0
@total_recorded_events = 0
@total_recorded_links = links&.size || 0