Axiom's Cloudflare Workers integration 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 worker's 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 integration 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.
The Axiom Cloudflare worker repository plugin is available on GitHub.
Copy the contents of src/worker.js into a new worker on Cloudflare.
Update the authentication variables to corresponding dataset and token:
const axiomDataset = "my-dataset" // Your Axiom dataset const axiomToken = "xapt-xxx" // Your Axiom API token
- The dataset is where your Cloudflare worker logs will be stored. Create a dataset from the settings page in the Axiom UI.
- The Axiom token will be your API token with ingest and query permissions.
- Add triggers for the worker, e.g., a route trigger:
- Navigate to the worker and click on the Triggers tab.
- Scroll down to Routes and click Add Route.
- Enter a route, e.g., *.example.com, choose the related zone, then click Save.
When requests are made to the routes you set up, the worker will be triggered, and you will see the logs delivered to your Axiom dataset.