Last active
January 4, 2016 06:09
Revisions
-
benedikt revised this gist
Jan 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ gem 'appsignal' # All of your other gems ``` Next, you have to create a new configuration file for your cloud to set up the `APPSIGNAL_PUSH_API_KEY` environment variable. This is pretty simple using `shelly config create .env` and enter this as its content: ```yaml APPSIGNAL_PUSH_API_KEY: your-appsignal-push-api-key-here -
benedikt revised this gist
Jan 23, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,4 +51,5 @@ If you want to get deployment notifications every time you deploy a new version ```bash set -e bundle exec dotenv appsignal notify_of_deploy --revision=$DEPLOYED_REVISION --user=$DEPLOY_AUTHOR --environment=$RAILS_ENV ``` -
benedikt revised this gist
Jan 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Setting up AppSignal on Shelly Cloud To set up AppSignal on Shelly Cloud, you first have to add both the `dotenv-rails` and the `appsignal` gem to your `Gemfile`. Make sure that the `dotenv-rails` gem is the very first gem in your `Gemfile` as it will set up important environment variables as soon as it is required. -
benedikt renamed this gist
Jan 23, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
benedikt created this gist
Jan 23, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ # Setting up App Signal on Shelly Cloud To set up AppSignal on Shelly Cloud, you first have to add both the `dotenv-rails` and the `appsignal` gem to your `Gemfile`. Make sure that the `dotenv-rails` gem is the very first gem in your `Gemfile` as it will set up important environment variables as soon as it is required. ```ruby # Gemfile source 'https://rubygems.org' gem 'dotenv-rails' gem 'appsignal' # All of your other gems ``` Next, you have to create a new configuration file for your cloud to set up the `APPSIGNAL_PUSH_API_KEY` environment variable. This is pretty simple using the `shelly config create .env` and enter this as its content: ```yaml APPSIGNAL_PUSH_API_KEY: your-appsignal-push-api-key-here ``` Finally make sure you have a proper `config/appsignal.yml` file set up. Simply create it with something similar to this as its content: ```yaml default: &defaults push_api_key: "<%= ENV['APPSIGNAL_PUSH_API_KEY'] %>" # Your app's name name: "Your app's name here" # The cuttoff point in ms above which a request is considered slow, default is 200 # slow_request_threshold: 200 # Configuration per environment, leave out an environment or set active # to false to not push metrics for that environment. development: <<: *defaults active: false production: <<: *defaults active: true ``` Thats it! After pushing your changes to Shelly Cloud, you should be seeing data showing up in AppSignal soon. ## Bonus: Deployment notifications If you want to get deployment notifications every time you deploy a new version of your application to Shelly Cloud, simply create a file called `config/deploy/shelly/after_successful_deploy`: ```bash set -e bundle exec dotenv appsignal notify_of_deploy --revision=$DEPLOYED_REVISION --user=$DEPLOY_AUTHOR --environment=$RAILS_ENV ```