Beacon
Get started

Tracing a serverless app in ten minutes

A practical walkthrough of instrumenting a Workers app with OpenTelemetry and sending traces to Beacon.

Beacon Engineering1 min read
Server racks lit in blue

Serverless platforms make deployment easy and debugging hard. Requests fan out across functions, queues and caches, and by the time a user reports a slow page you've lost the thread. Distributed tracing gives it back.

1. Install the SDK

Add the OpenTelemetry SDK and Beacon's exporter to your project. Both are a single dependency and work on Node, Bun and Workers runtimes.

2. Wrap your handler

Beacon's helper wraps your fetch handler so every request becomes a root span automatically. Outbound fetches, KV reads and D1 queries are captured as child spans without any extra code.

3. Look at a trace

Deploy, hit an endpoint, and open the trace viewer. You'll see the request timeline, every downstream call, and the logs emitted during each span. Slow spans are highlighted so you can go straight to the problem.

What about cost?

Traces are sampled at the edge by default. You keep 100% of errors and slow requests and a configurable share of everything else.

More from the blog

Analytics dashboard on a laptop
Product· 1 min read

Introducing Beacon 2.0

A faster query engine, a redesigned trace viewer, and pricing that finally makes sense.