lib/opentelemetry/trace/propagation/trace_context/trace_parent.rb in opentelemetry-api-0.7.0 vs lib/opentelemetry/trace/propagation/trace_context/trace_parent.rb in opentelemetry-api-0.8.0

- old
+ new

@@ -29,12 +29,12 @@ INVALID_SPAN_ID = OpenTelemetry::Trace::SpanContext::INVALID.hex_span_id private_constant :INVALID_TRACE_ID, :INVALID_SPAN_ID class << self # Creates a new {TraceParent} from a supplied {Trace::SpanContext} - # @param [SpanContext] ctx The context + # @param [SpanContext] ctx The span context # @return [TraceParent] a trace parent - def from_context(ctx) + def from_span_context(ctx) new(trace_id: ctx.trace_id, span_id: ctx.span_id, flags: ctx.trace_flags) end # Deserializes the {TraceParent} from the string representation # @param [String] string The serialized trace parent