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_event.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

modu
    
    def to_hash
      data = super
      data[:spans] = @spans.map(&:to_hash) if @spans
      data[:start_timestamp] = @start_timestamp
      data[:measurements] = @measurements
      data
    end