The Axiom Cloudflare Workers app provides granular detail about the traffic coming in from your monitored sites. This includes edge requests, static resources, client auth, response duration, and status. Axiom gives you an all-at-once view of key Cloudflare Workers metrics and logs, out of the box, with our dynamic Cloudflare Workers dashboard.

The data obtained with the Axiom dashboard gives you better insights into the state of your Cloudflare Workers so you can easily monitor bad requests, popular URLs, cumulative execution time, successful requests, and more. The app is part of Axiom’s unified logging and observability platform, so you can easily track Cloudflare Workers edge requests alongside a comprehensive view of other resources in your Cloudflare Worker environments.

Axiom Cloudflare Workers is an open-source project and welcomes your contributions. For more information, see the GitHub repository.

What is Cloudflare Workers

Cloudflare Workers is a serverless computing platform developed by Cloudflare. The Workers platform allows developers to deploy and run JavaScript code directly at the network edge in more than 200 data centers worldwide. This serverless architecture enables high performance, low latency, and efficient scaling for web apps and APIs.

Prerequisites

Send Cloudflare Worker logs to Axiom

  1. In Cloudflare, create a new worker. For more information, see the Cloudflare documentation.

  2. Copy the contents of the src/worker.js file into the worker you have created.

  3. Update the authentication variables:

    const axiomDataset = "DATASET_NAME"
    const axiomToken = "API_TOKEN"
    
    • Replace API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.
    • Replace DATASET_NAME with the name of the Axiom dataset where you want to send data.
  4. Add triggers for the worker. For example, add a route trigger using the Cloudflare documentation.

When the routes receive requests, the worker is triggered and the logs are sent to your Axiom dataset.