Claude Code monitoring with Cloudflare Workers & Workers Analytics Engine
git clone https://github.com/cometkim/cc-monitor-worker.gitClaude Code monitoring with Cloudflare Workers & Workers Analytics Engine
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/cometkim/cc-monitor-workerCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
I want to monitor my [COMPANY] website's performance using Cloudflare Workers and Workers Analytics Engine. Here's the code I'm using: [CODE]. Please help me set up monitoring to track [METRICS] and alert me when [THRESHOLDS] are exceeded. Provide a step-by-step guide and any necessary configuration details.
## Cloudflare Workers Monitoring Setup Guide
To monitor your website's performance using Cloudflare Workers and Workers Analytics Engine, follow these steps:
### 1. Set Up Workers Analytics Engine
1. Log in to your Cloudflare dashboard.
2. Navigate to the Workers & Pages section.
3. Select Analytics Engine from the left-hand menu.
4. Click on 'Create Dataset' and follow the prompts to configure your data collection.
### 2. Integrate Monitoring Code
Add the following code to your Worker script to track the specified metrics:
```javascript
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
const url = new URL(request.url)
const response = await fetch(request)
const analytics = {
status: response.status,
latency: Date.now() - request.timeStart,
size: response.headers.get('content-length')
}
// Send analytics data to Workers Analytics Engine
// Add your specific monitoring logic here
return response
}
```
### 3. Configure Alerts
1. In the Cloudflare dashboard, go to Workers Analytics Engine.
2. Select your dataset and click on 'Alerts'.
3. Create a new alert for each metric you want to monitor.
4. Set the threshold values for each alert.
5. Configure the notification preferences to receive alerts via email or other channels.
### 4. Test and Deploy
1. Test your Worker script in the Cloudflare Workers playground.
2. Deploy your Worker to the Cloudflare network.
3. Monitor the analytics data and alerts to ensure everything is working as expected.
Execute serverless functions at the edge with automatic scaling and customization.
AI assistant built for thoughtful, nuanced conversation
Protect and enhance web performance with DDoS protection, firewalls, and content delivery.
IronCalc is a spreadsheet engine and ecosystem
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan