1. Streamlines the submission of custom metrics to Stackdriver through a drush command.
  2. Project Page
  3. Clone command: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/malcolm.daigle/2249275.git custom_stackdriver_metrics
CommentFileSizeAuthor
#15 pareview.sh-errors.png44.6 KBsanat.panda
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxmalcolmdaigle2249275git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

brice_gato’s picture

Hello malcolm.daigle,

You sould put custom_stackdriver_metrics_install function into a custom_stackdriver_metrics.install file, and delete custom_stackdriver_metrics_help if you leave it commented.
Replace "admin" with a specific permission for admin/settings/custom_stackdriver_metrics (line 17) => use hook_permission

malcolm.daigle’s picture

Status: Needs work » Needs review

Thanks Brice. I made the changes you suggested.

dragonmantank’s picture

Status: Needs review » Needs work

Running drupalcs on it still returns a lot of errors that need taken care of.

One, which you've tried to fix, is the st() calls in the install file. While you're using $t = get_t(), you are still using st() directly. You should replace st() with $t() to clear that up.

In custom_stackdriver_metrics_send(), I would replace "\n" with PHP_EOL to make sure it works correctly across all platforms and renders correctly in the terminal.

In the same function, does the API return good error messages, or different error messages based on return code? You may want to check the actual return result instead of just dumping it out the client, in case the call fails.

malcolm.daigle’s picture

Status: Needs work » Needs review

Thank you for your suggestions dragonmantank.

malcolm.daigle’s picture

Priority: Normal » Major
matthias_mo’s picture

Hi Malcolm!

Nice module! Here's my review/my suggestions:

  • The link to the stackdriver home page you provided is not correct
  • I'd use the watchdog() function to set warnings and results instead of these 2:
      if ($api_key == 'API Key Needed') {
        echo $api_key . PHP_EOL;
        return;
      }

    echo custom_stackdriver_metrics_process_result($curl_result) . PHP_EOL;

  • There is no need to append a ';' after each closing function curly bracket
  • You might want considering implementing hook_cron for automatic transmissions
  • You should fix the clone command in your application:
     git clone --branch 7.x-1.x http://git.drupal.org/sandbox/malcolm.daigle/2249275.git custom_stackdriver_metrics
    
  • the branch 7.x-1.x-dev is probably not necessary; development snapshot can be provided by project settings once it is a full project. See also branch naming conventions here
matthias_mo’s picture

Status: Needs review » Needs work
malcolm.daigle’s picture

Priority: Major » Normal
malcolm.daigle’s picture

Issue summary: View changes
malcolm.daigle’s picture

Issue summary: View changes
malcolm.daigle’s picture

Hey Matthias!

Thanks for taking the time to review my module.
I have made all the changes you suggested.

malcolm.daigle’s picture

Status: Needs work » Needs review
malcolm.daigle’s picture

Priority: Normal » Major
sanat.panda’s picture

Status: Needs review » Needs work
Issue tags: +PareView.sh issues
FileSize
44.6 KB

Hi,

PareView.sh (Automated testing) is showing some errors that needs to be taken care of.
Find the attached file for more information and do the need.

Sanat

klausi’s picture

Status: Needs work » Needs review

minor coding standard issues are not application blockers, please do a real manual review.

naveenvalecha’s picture

Issue tags: -PareView.sh issues

Removing tag.

AndreaD’s picture

Status: Needs review » Needs work

* When module is enabled the message you are sending to enduser is not formated correctly, and says the following:
"Custom Stackdriver Metrics' settings are available under <a href="/admin/settings/custom_stackdriver_metrics">Administer &gt; Admin Index &gt; Custom Stackdriver Metrics</a>"

* Your settings page should be moved under the Configuration menu. And should be available from the modules page.

* You can enter anything for API key settings, and Drupal will say that configuration set. You should make a validation, and give an error message if the validation-code dosen't look right.

*You have to use hook_uninstall at variable_del() on the variables you have set.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.