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: appoptics_trace.rb
    path of file: ./repos/graphql-ruby/lib/graphql/tracing
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module GraphQL
  module Tracing

    # This class uses the AppopticsAPM SDK from the appoptics_apm gem to create
    # traces for GraphQL.
    #
    # There are 4 configurations available. They can be set in the
    # appoptics_apm config file or in code. Please see:
    # {https://docs.appoptics.com/kb/apm_tracing/ruby/configure}
    #
    #     AppOpticsAPM::Config[:graphql][
    
          def #{trace_method}(**data)
            return super if !defined?(AppOpticsAPM) || gql_config[:enabled] == false
            layer = span_name("#{trace_method}")
            kvs = metadata(data, layer)
            kvs[:Key] = "#{trace_method}" if (PREP_KEYS + EXEC_KEYS).include?("#{trace_method}")

            transaction_name(kvs[:InboundQuery]) if kvs[:InboundQuery] && layer == 'graphql.execute'

            ::AppOpticsAPM::SDK.trace(layer, kvs) do
              kvs.clear # we don't have to send them twice
              super
            end
          end
        RUBY
      end