From 134ba7dad56a637457d60df447da25b14e2a13f8 Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Wed, 14 Feb 2018 14:30:22 +0100 Subject: [PATCH] Enable Skylight in staging This is a follow-up of https://github.com/openfoodfoundation/openfoodnetwork/pull/2070. When running the production API key in staging, the `log/skylight.log` showed: ``` [SKYLIGHT] [1.5.0] You are running in the staging environment but haven't added it to config.skylight.environments, so no data will be sent to skylight.io. ``` According to https://www.skylight.io/support/advanced-setup#setting-up-multiple-environments it turns out we need to create a new app for staging and use its API key. --- config/application.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/application.rb b/config/application.rb index d5b30e9930ed..98bdb1e33666 100644 --- a/config/application.rb +++ b/config/application.rb @@ -24,6 +24,13 @@ class Application < Rails::Application end end + # Activate the Skylight agent in staging. You need to provision the + # SKYLIGHT_AUTHENTICATION env var in your OFN instance for this to work. + # + # Check https://github.com/openfoodfoundation/openfoodnetwork/pull/2070 for + # details + config.skylight.environments += ["staging"] + # Settings dependent on locale # # We need to set this config before the promo environment gets loaded and