From fbc5318a7b099590d5d927e25d07a53d7e071780 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Tue, 6 Feb 2018 19:53:09 -0800 Subject: [PATCH] Add Skylight instrumentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If you’re not already familiar with [Skylight](https://www.skylight.io), it is a smart profiler for Rails apps. Skylight makes it easy to pinpoint performance issues in Rails applications. We work on a lot of open source projects ourselves, and in our experience it can be pretty hard to get contributors to work on application performance issues. Few contributors consider working on performance problems, and the ones that might be interested may not even know where to start. By making performance information more accessible, we hope to inspire potential contributors to tackle slow parts of your app, and have a good way to see if their contributions helped. Local deployments that are interested in this can request an API token from https://www.skylight.io/oss and set it in `config/application.yml` (if no token is set, it will log a message to `log/skylight.log` but won't otherwise prevent the app from working normally). --- Gemfile | 1 + Gemfile.lock | 3 +++ config/application.yml.example | 3 +++ 3 files changed, 7 insertions(+) diff --git a/Gemfile b/Gemfile index 66e717039a..888389d0fb 100644 --- a/Gemfile +++ b/Gemfile @@ -64,6 +64,7 @@ gem 'blockenspiel' gem 'acts-as-taggable-on', '~> 3.4' gem 'paper_trail', '~> 3.0.8' gem 'diffy' +gem 'skylight', '< 2.0' gem 'wicked_pdf' gem 'wkhtmltopdf-binary' diff --git a/Gemfile.lock b/Gemfile.lock index 883b658265..85111c6141 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -641,6 +641,8 @@ GEM shellany (0.0.1) shoulda-matchers (1.1.0) activesupport (>= 3.0.0) + skylight (1.5.0) + activesupport (>= 3.0.0) spinjs-rails (1.3) rails (>= 3.1) sprockets (2.2.3) @@ -784,6 +786,7 @@ DEPENDENCIES sass-rails (~> 3.2.3) shoulda-matchers simple_form! + skylight (< 2.0) spinjs-rails spree! spree_auth_devise! diff --git a/config/application.yml.example b/config/application.yml.example index 310e248726..a75a3b3015 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -27,6 +27,9 @@ CURRENCY: AUD # see: https://developers.google.com/maps/documentation/javascript/get-api-key # GOOGLE_MAPS_API_KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +# optional, see: https://www.skylight.io/oss +# SKYLIGHT_AUTHENTICATION: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + # Stripe Connect details for instance account # Find these under 'API keys' and 'Connect' in your Stripe account dashboard -> Account Settings # Under 'Connect', the Redirect URI should be set to https://YOUR_SERVER_URL/stripe/callbacks (e.g. https://openfoodnetwork.org.uk/stripe/callbacks)