Our great sponsors
-
tracetest
đ Tracetest - Build integration and end-to-end tests in minutes, instead of days, using OpenTelemetry and trace-based testing.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
otel-cf-workers
An OpenTelemetry compatible library for instrumenting and exporting traces for Cloudflare Workers
If youâre eager to start, clone the example from GitHub and get a Tracetest Agent public URL and Token after signing up at app.tracetest.io. Sign up for a Cloudflare account on
Cloudflare Workers are Cloudflareâs answer to AWS Lambda. They let you deploy serverless code instantly across the globe and are blazing fast. You write code and deploy it to cloud environments without the need for traditional infrastructure.
Luckily for you and me, Erwin van der Koogh ****wrote an awesome package for wrapping the OpenTelemetry libraries in Cloudflare Workers. Itâs called otel-cf-workers and it is beautiful! 𤊠â Letâs be awesome to each other and give him as many â as possible on GitHub!
/** * Welcome to Cloudflare Workers! This is your first worker. * * - Run `npm run dev` in your terminal to start a development server * - Open a browser tab at http://localhost:8787/ to see your worker in action * - Run `npm run deploy` to publish your worker * * Learn more at https://developers.cloudflare.com/workers/ */ export interface Env { // Example binding to KV. Learn more at https://developers.cloudflare.com/workers/runtime-apis/kv/ // MY_KV_NAMESPACE: KVNamespace; // // Example binding to Durable Object. Learn more at https://developers.cloudflare.com/workers/runtime-apis/durable-objects/ // MY_DURABLE_OBJECT: DurableObjectNamespace; // // Example binding to R2. Learn more at https://developers.cloudflare.com/workers/runtime-apis/r2/ // MY_BUCKET: R2Bucket; // // Example binding to a Service. Learn more at https://developers.cloudflare.com/workers/runtime-apis/service-bindings/ // MY_SERVICE: Fetcher; // // Example binding to a Queue. Learn more at https://developers.cloudflare.com/queues/javascript-apis/ // MY_QUEUE: Queue; } export default { async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise { return new Response('Hello World!'); }, };
Related posts
- Discord Bot with Cloudflare AI
- Developing your own Chrome Extension - Fetch with a Proxy and Cloudflare Workers (Part 5)
- Drastically Cut CI Time in an Nx Monorepo with Remote Task Caching: A Step-by-Step Guide
- Cloudflare Workers: Solusi serverless edge function termudah, tercepat, termurah, what else..?
- [HELP] can't deploy my program to cloudflare worker.