You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: transaction.rb
    path of file: ./repos/sentry-ruby/sentry-ruby/lib/sentry
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require "sentry/baggage"
require "sentry/profiler"
require "sentry/propagation_context"

module Sentry
  class Transaction < Span
    # @deprecated Use Sentry::PropagationContext::SENTRY_TRACE_REGEXP instead.
    SENTRY_TRACE_REGEXP = PropagationContext::SENTRY_TRACE_REGEXP

    UNLABELD_NAME = "<unlabeled transaction>".fre
    
    def self.from_sentry_trace(sentry_trace, baggage: nil, hub: Sentry.get_current_hub, **options)
      return unless hub.configuration.tracing_enabled?
      return unless sentry_trace

      sentry_trace_data = extract_sentry_trace(sentry_trace)
      return unless sentry_trace_data

      trace_id, parent_span_id, parent_sampled = sentry_trace_data

      baggage =
        if baggage && !baggage.empty?
          Baggage.from_incoming_header(baggage)
        else
          # If there's an incoming sentry-trace but no incoming baggage header,
          # for instance in traces coming from older SDKs,
          # baggage will be empty and frozen and won't be populated as head SDK.
          Baggage.new({})
        end