lib/opentelemetry/sdk/trace/span_data.rb in opentelemetry-sdk-1.1.0 vs lib/opentelemetry/sdk/trace/span_data.rb in opentelemetry-sdk-1.2.0
- old
+ new
@@ -21,11 +21,11 @@
:end_timestamp, # Integer nanoseconds since Epoch
:attributes, # optional Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}
:links, # optional Array[OpenTelemetry::Trace::Link]
:events, # optional Array[Event]
:resource, # OpenTelemetry::SDK::Resources::Resource
- :instrumentation_library, # OpenTelemetry::SDK::InstrumentationLibrary
+ :instrumentation_scope, # OpenTelemetry::SDK::InstrumentationScope
:span_id, # String (8 byte binary)
:trace_id, # String (16-byte binary)
:trace_flags, # Integer (8-bit byte of bit flags)
:tracestate) do # OpenTelemetry::Trace::Tracestate
# Returns the lowercase [hex encoded](https://tools.ietf.org/html/rfc4648#section-8) span ID.
@@ -46,9 +46,15 @@
#
# @return [String] A 16-hex-character lowercase string.
def hex_parent_span_id
parent_span_id.unpack1('H*')
end
+
+ # Returns an InstrumentationScope struct, which is backwards compatible with InstrumentationLibrary.
+ # @deprecated Please use instrumentation_scope instead.
+ #
+ # @return InstrumentationScope
+ alias_method :instrumentation_library, :instrumentation_scope
end
end
end
end