Heroku is platform as a service (PaaS) providing support for several programming languages. You can use Atatus APM with your Heroku apps. Atatus APM supports PHP, Java, Ruby, Python and Node.js languages.
Follow the below mentioned steps to install Atatus in Heroku Ruby app.
Django installation steps
From Heroku dashboard, select the relevant application you have created and choose Atatus from the add-on page. There are two ways to choose the add-on.
- From UI, you can click on the Configure add-ons and then select the subscription plan.
- From Command line
copyheroku addons:create atatus:$planlevel -a YOUR_APP
Go to Atatus dashboard by clicking on the Atatus add-on and navigate to the Settings » Account Settings » License Keys in Atatus and copy the Atatus APM License key.
From your terminal, go to your Django app directory and set the license key and application name in heroku config as follows.
copyheroku config:set ATATUS_APP_NAME='Django App' -a YOUR_APP heroku config:set ATATUS_LICENSE_KEY='Your APM License Key' -a YOUR_APP
copy# Verify config heroku config
Add
atatus.contrib.django
toINSTALLED_APPS
in your settings.py:copy# settings.py INSTALLED_APPS = [ # ... 'atatus.contrib.django', ]
Add
atatus
to your project's requirements.txt file.copy# requirements.txt atatus
Create a
Procfile
in your root directory and add the following line.web: gunicorn yoursite.wsgi
Run the following commands to commit the changes.
copygit add . git commit -m "Add Atatus Agent" git push heroku main && heroku logs --tail
Access your server from your web app or mobile app or curl. You will visualize your application's metrics within minutes.
Flask installation steps
From Heroku dashboard, select the relevant application you have created and choose Atatus from the add-on page. There are two ways to choose the add-on.
- From UI, you can click on the Configure add-ons and then select the subscription plan.
- From Command line
copyheroku addons:create atatus:$planlevel -a YOUR_APP
Go to Atatus dashboard by clicking on the Atatus add-on and navigate to the Settings » Account Settings » License Keys in Atatus and copy the Atatus APM License key.
From your terminal, go to your Flask app directory and set the license key and application name in heroku config as follows.
copyheroku config:set ATATUS_APP_NAME='Flask App' -a YOUR_APP heroku config:set ATATUS_LICENSE_KEY='Your APM License Key' -a YOUR_APP
copy# Verify config heroku config
Add
atatus[flask]
to your project's requirements.txt file.copy# requirements.txt atatus[flask]
Create a
Procfile
in your root directory and add the following line.web: gunicorn yoursite.wsgi
Run the following commands to commit the changes.
copygit add . git commit -m "Add Atatus Agent" git push heroku main && heroku logs --tail
Access your server from your web app or mobile app or curl. You will visualize your application's metrics within minutes.