> ## Documentation Index
> Fetch the complete documentation index at: https://docs.traceback.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloudflare Workers SDK

> Ultra-low latency error capture and distributed tracing tailored for Cloudflare V8 isolates.

## Installation

```bash theme={null}
npm install @traceback/cloudflare
```

***

## Usage

```typescript theme={null}
import { withTraceback } from "@traceback/cloudflare";

export default withTraceback({
  dsn: "https://tb_live_key@ingest.traceback.dev/1",
}, {
  async fetch(request, env, ctx) {
    if (new URL(request.url).pathname === "/fail") {
      throw new Error("Worker edge crash");
    }
    return new Response("OK");
  }
});
```
