def display_backtrace_for_query_type?(payload)
      case ActiveRecordQueryTrace.query_type
      when :all then true
      when :read then db_read_query?(payload)
      when :write then !db_read_query?(payload)
      else
        raise 'Invalid ActiveRecordQueryTrace.query_type value ' \
          "#{ActiveRecordQueryTrace.level}. Should be :all, :read, or :write."
      end
    end
def display_backtrace_for_query_type?(payload)
      case ActiveRecordQueryTrace.query_type
      when :all then true
      when :read then db_read_query?(payload)
      when :write then !db_read_query?(payload)
      else
        raise 'Invalid ActiveRecordQueryTrace.query_type value ' \
          "#{ActiveRecordQueryTrace.level}. Should be :all, :read, or :write."
      end
    end
rubocop:enable Metrics/CyclomaticComplexity
 rubocop:enable Metrics/PerceivedComplexity