Heroku is a platform as a service that lets developers build and operate cloud-based applications. Using Heroku log drains, you can transport logs from your applications and deployments to Axiom by sending them via HTTPS.
Whether you are running complex workloads, hosting your applications on Heroku, and configuring your web servers Axiom provides you with that monitoring capability tool that gives you a 360-degree view across your Heroku applications, application code, and eventually allows your team to collaborate. You will get insights from your Heroku application and visualize and analyze your data using Axiom Data Explorer.
- Create and log in to your Account on Axiom Cloud
- Access to Heroku Account
- Create a Heroku sample application
- Download and Install Heroku CLI
- Axiom Dataset and Token.
- To ship logs from Heroku to Axiom, you need a dataset and an Ingest token. To create a new dataset, go to Settings → Datasets on the Axiom UI.
Generate your ingest token, Visit our docs to learn how you can generate ingest tokens.
Create your sample-app on Heroku. You can either create your sample-app using the Heroku CLI or on your Heroku dashboard. If you want to create your app using the Heroku dashboard, click on New, and select Create new app.
- In this tutorial, we will be creating our sample-app using the Heroku CLI.
- In your terminal, login to your Heroku dashboard by typing
heroku loginin your terminal.
- Wait for some seconds, it will redirect you to Heroku page to login.
- Create your Heroku app using
heroku create <NAME_OF_YOUR_APPLICATION>if you don't give your app a name, a random name will be generated for you by Heroku.
- You can see that our app is created with the git URL and deployment URL.
- Visit your application URL, to confirm if you can see it.
- In your sample-app source code, you need to commit and deploy your changes to your
git appthat was created.
- initialize a git repository in your existing sample-app directory.
git init heroku git:remote -a axiomcloudselfhost
- Deploy your application and commit your code to the repository and deploy it to Heroku using Git.
git add . git commit -am "commit heroku app" git push heroku master
- Refresh your application URL, you will see your sample app has been deployed and the changes have been reflected.
- Back in Axiom, you can forward your logs from your Heroku application to Axiom via HTTPS using our Heroku log drains data shipper. Copy, update the configuration below and paste it into your terminal.
heroku drains:add https://:email@example.com/api/v1/datasets/herokuapp/ingest -a axiomcloudselfhost
- xait-xxx-xxxx-xxxx-xxxx-xxxx: is my ingest token, I created in step 1.
- herokuapp is my dataset name on Axiom dashboard I created in step 2.
- axiomcloudselfhost is my Heroku application I created using the Heroku CLI.
You will need to update the parameters above using your own values.
- In your Axiom dashboard, select the dataset you configured for your Heroku log drains configuration in step 8. You will see the logs from your Heroku application. You can now analyze your events, extract insights and get queries from your application using Axiom Analytics, Data Explorer, and Axiom Stream.
- Run aggregations across all or a subset of events in your
herokuappdataset to visualize the output:
- Get detailed statistics into the way your Heroku application is performing and run super-fast queries in seconds using Axiom Data Explorer.
- You can also stream your Heroku logs on Axiom. This lets you inspect individual events from your Heroku application and watch as they are ingested live.
- View your Event Properties on the
You can see how straightforward it is to monitor, analyze, and run queries on your Heroku application directly on Axiom.
Heroku Application URL: https://axiomcloudselfhost.herokuapp.com/
Click this link to join other developers in the Axiom community who are using Axiom. Find resources, ask questions, and share your knowledge!
Sign up for Axiom Cloud - The fastest and simplest way to get started with Axiom.
If you want to explore Axiom and learn more about our integrations and data shippers, visit the links below:
- Monitoring using Axiom's Data Explorer
- Introducing Axiom Playground
- Getting the best out of Axiom's Log Streams
- Axiom Data Shippers
- Learn more about Axiom Processing Language