This buildpack installs the Raygun APM agent on your dyno, and starts it after every deploy. To collect data from your application, you will also need the relevant Raygun library for your language installed and loaded.
For more information see the language specific instructions below.
If you've never deployed your Rails project on Heroku before, please consult these instructions first to get started.
For Ruby applications, you need to add the relevant Ruby gem (raygun-apm-rails for a Rails app, raygun-apm otherwise) to your Gemfile.
cd <YOUR RUBY/RAILS PROJECT>
bundle add raygun-apm-rails -g production # unless you already have the gem in your Gemfile
# Initialize a new Heroku project
heroku create
# add the Ruby buildpack
heroku buildpacks:add heroku/ruby
# add this buildpack
heroku buildpacks:add https://github.com/MindscapeHQ/heroku-buildpack-raygun-apm
# add your APM API key to your application configuration
heroku config:add RAYGUN_API_KEY=<YOUR RAYGUN API KEY>
# Deploy to Heroku
git commit -a -m "Heroku setup for Raygun APM"
git push heroku master
Once installed, the APM agent is started automatically when each dyno starts.
Make sure your Gemfile has the APM gem in it:
group :production do
gem 'raygun-apm-rails'
end
If you've never deployed a Node.js project on Heroku before, please consult these instructions first to get started.
For Node applications, you will need to install and import the raygun-apm package.
Please consult the raygun-apm
documentation for detailed instructions on installing and configuring. For simple web applications, this should be enough:
npm install --save raygun-apm
- Add
require('raygun-apm/http')
orimport 'raygun-apm/http'
at the top of your app's entrypoint.
cd <YOUR NODE.JS PROJECT>
# Initialize a new Heroku project
heroku create
# add this buildpack
heroku buildpacks:add https://github.com/MindscapeHQ/heroku-buildpack-raygun-apm
# add the Node.js buildpack
heroku buildpacks:add heroku/nodejs
# add your APM API key to your application configuration
heroku config:add RAYGUN_API_KEY=<YOUR RAYGUN API KEY>
# Deploy to Heroku
git push heroku master
Once installed, the APM agent is started automatically when each dyno starts.
Make sure your package.json contains the APM package:
"dependencies": {
"raygun-apm: "^0.4.0"
}
The above version is an example. Please use the latest version available, which may not always be reflected in this README.
Also, the raygun-apm
package needs to be imported before it can run. If you are writing a web app, please ensure that the first line of the entry point of your web server imports raygun-apm/http
.