Home / Companies / Upstash / Blog / Post Details
Content Deep Dive

Collect Cloudflare Workers Logs to Serverless Kafka

Blog post from Upstash

Post Details
Company
Date Published
Author
Noah Fischer
Word Count
305
Company Posts That Month
3
Language
English
Hacker News Points
-
Post removed?
No
Summary

This tutorial provides a step-by-step guide on how to collect logs from Cloudflare Workers and send them to a Serverless Kafka setup using Upstash. It begins with setting up a Kafka cluster and topic through the Upstash Console or CLI, followed by configuring a project using Wrangler 2 for deployment, which includes initializing a new project directory, setting up package management, and creating necessary configuration files. The tutorial then details how to update the JavaScript code in `src/index.js` to send logs to Kafka using a webhook URL and offers options for using Upstash Kafka SDK or REST API. Testing and deployment instructions are provided, including local testing with `wrangler dev` and publishing the function to Cloudflare with `wrangler publish`, with guidance on verifying log collection in Kafka using a curl command.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Serverless 2 760 116 55 +5%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.