Published on

What is Axiom? A Guide to High-Performance, Low-Cost Logging

Axiom is a cloud-native observability platform (a tool used to monitor, visualize, and store data about your software) that allows you to ingest, store, and query 100% of your logs and events without breaking your budget. By using a unique serverless architecture, Axiom can process terabytes of data in seconds, providing real-time insights for apps built with modern frameworks like Next.js 15 or Python 3.12. Most developers can set up their first data stream and see live logs in under five minutes.

What makes Axiom different from traditional logging tools?

Traditional logging tools often force you to choose which data to keep because storage costs are so high. Axiom uses a different approach by separating "compute" (the processing power) from "storage" (where the data lives), which makes it significantly cheaper to store every single event your application generates.

In our experience, the ability to keep "everything" is a massive advantage when a bug appears weeks after the code was deployed. You don't have to worry about "sampling" (only saving a small percentage of data) or "retention limits" (deleting data after a few days) like you might with older platforms.

Because it is built for the modern web, it integrates directly with platforms like Vercel and Netlify. This means you can see exactly what is happening inside your serverless functions (small pieces of code that run on demand) without manually configuring complex servers or agents.

What are the core concepts you need to know?

Before you start sending data, you should understand three main terms that Axiom uses to organize your information.

  • Datasets: Think of a dataset as a giant bucket where you drop your logs. You might have one dataset for your "Production" app and another for "Development."
  • Ingestion: This is the process of sending data from your code to Axiom. You can do this using an API (Application Programming Interface—a way for programs to talk to each other) or a pre-built library.
  • APL (Axiom Processing Language): This is the specific language you use to search your data. It looks a lot like Kusto or piped commands, allowing you to filter results by typing things like ['my-dataset'] | where status == 500.

What do you need to get started?

To follow along with this guide, you should have a few basics ready. Don't worry if you haven't used these before; the setup is very beginner-friendly.

  • A free Axiom account (you can sign up with GitHub).
  • A basic project running locally (Node.js 20+ or Python 3.12+ is recommended).
  • An API Token from your Axiom settings (this acts like a password for your data).

Step 1: How do you create your first dataset?

The first step is creating a place for your data to live. Log in to your Axiom dashboard and look for the "Datasets" tab on the left-hand sidebar.

  1. Click the "Create Dataset" button in the top right corner.
  2. Give your dataset a name, such as my-first-app.
  3. Click "Create" and you will see an empty screen waiting for data.

What you should see: A success message confirming the dataset is ready. You will also see a "Data Ingestion" tab that shows you different ways to send your first log.

Step 2: How do you send data using the Axiom SDK?

An SDK (Software Development Kit—a collection of tools for a specific language) makes it easy to connect your code to Axiom. For this example, we will use the Axiom Node.js library, which is perfect for Next.js 15 or React 19 projects.

  1. Open your terminal in your project folder and run npm install @axiomhq/js.
  2. Create a new file called logger.js and add the following code:
// Import the Axiom client
import { Axiom } from '@axiomhq/js';

// Initialize with your credentials
const axiom = new Axiom({
  token: 'xaat-your-api-token', // Replace with your actual token
  orgId: 'your-org-id',         // Found in your Axiom settings
});

// Create a simple function to send a log
async function sendLog() {
  // Send a simple event to your dataset
  axiom.ingest('my-first-app', [{ 
    message: 'Hello from my first app!', 
    user: 'beginner-dev',
    status: 'success' 
  }]);

  // Ensure all logs are sent before the script ends
  await axiom.flush();
  console.log('Log sent successfully!');
}

sendLog();
  1. Run the script by typing node logger.js in your terminal.

What you should see: The terminal should print "Log sent successfully!" If you get an error, check that your API token has "Ingest" permissions enabled in the Axiom dashboard.

Step 3: How do you view and query your logs?

Now that you have sent data, it is time to find it. Go back to your Axiom dashboard and click on the "Data Explorer" icon.

  1. Select your dataset (my-first-app) from the dropdown menu.
  2. Click the "Run" button to see all recent events.
  3. In the query bar at the top, type | where status == "success" and click Run again.

What you should see: A table showing the log you just sent. It will include the message "Hello from my first app!" along with a timestamp (the exact time the event happened) that Axiom added automatically.

What are the common "gotchas" for beginners?

It is normal to run into a few hurdles when you are first learning about observability. Here are the most common issues we see beginners face.

  • Missing Flush: In serverless environments (like Vercel), your code might finish running before the logs are actually sent. Always use await axiom.flush() to make sure the data leaves your app before the process closes.
  • Token Permissions: When you create an API token, you must choose what it can do. If you forget to check the "Ingest" box, your code will get a "403 Forbidden" error.
  • Case Sensitivity: APL (the query language) is case-sensitive. If you send a field named Status and search for status, you won't find any results.

Why should you use Axiom for your next project?

Axiom removes the "fear of the bill" that often comes with professional logging tools. Because it handles the scaling (automatically growing to handle more data) for you, you can focus on building your app instead of managing database servers.

It also integrates with the latest AI models. For example, you can use Claude Sonnet 4 or GPT-4o to analyze your logs by connecting Axiom to your AI workflows. This allows you to ask questions like "Why did my users experience errors yesterday?" and get a summary based on your actual log data.

Next Steps

Now that you've sent your first log, you can start exploring more advanced features. Try setting up a "Dashboard" to visualize your data with charts, or create an "Axiom Monitor" to send you an email if your app starts throwing too many errors.

If you want to build a real-world application, try integrating Axiom with a Next.js 15 project to track page views or API response times. This will give you a clear picture of how your users are interacting with your site.

For more technical details and advanced query examples, check out the official Axiom documentation.


Read the Axiom Documentation