This documentation contains work-in-progress information for future Elastic Stack and Cloud releases. Use the version selector to view supported release docs. It also contains some Elastic Cloud serverless information. Check out our serverless docs for more details.
Getting started with Rails
editGetting started with Rails
editSetup
editAdd the gem to your Gemfile
:
gem 'elastic-apm'
Create a file config/elastic_apm.yml
:
server_url: http://localhost:8200 secret_token: ''
Or if you prefer environment variables, skip the file and set ELASTIC_APM_SERVER_URL
and ELASTIC_APM_SECRET_TOKEN
in your local or server environment.
This automatically sets up error logging and performance tracking but of course there are knobs to turn if you’d like to. See Configuration.