Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/platforms/javascript/guides/cloudflare/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Use this guide for general instructions on using the Sentry SDK with Cloudflare.
- **[Remix](/platforms/javascript/guides/cloudflare/frameworks/remix/)**
- **[SvelteKit](/platforms/javascript/guides/cloudflare/frameworks/sveltekit/)**

<Alert>
The Cloudflare Workers runtime has some platform-specific limitations that affect tracing. See [Known Limitations](#known-limitations) for details.
</Alert>

<PlatformContent includePath="getting-started-prerequisites" />

## Step 1: Install
Expand Down Expand Up @@ -208,6 +212,14 @@ Now, head over to your project on [Sentry.io](https://sentry.io) to view the col

<PlatformContent includePath="getting-started-verify-locate-data" />

## Known Limitations

### Span Durations

Server-side spans will display `0ms` for their durations. In the Cloudflare Workers runtime, `performance.now()` and `Date.now()` only advance after I/O occurs. CPU-bound operations will show zero duration. This is a security measure Cloudflare implements to [mitigate against timing attacks](https://developers.cloudflare.com/workers/runtime-apis/performance/).

This is expected behavior in the Cloudflare Workers environment and affects all frameworks deployed to Cloudflare Workers, including Next.js, Astro, Remix, and others.

## Next Steps

At this point, you should have integrated Sentry and should already be sending data to your Sentry project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,4 @@ After adding these settings, build and deploy your Next.js application to Cloudf

## Known Limitations

### Server-Side Span Durations

Server-side spans will display `0ms` for their durations due to a security measure Cloudflare Workers implements to prevent timing attacks. This is expected behavior in the Cloudflare Workers environment.

For more information about this limitation, see the [Cloudflare Workers documentation on Performance APIs](https://developers.cloudflare.com/workers/runtime-apis/performance/).
When running on Cloudflare Workers, there are some platform-specific limitations to be aware of. See the [Cloudflare SDK Known Limitations](/platforms/javascript/guides/cloudflare/#known-limitations) for details.