Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add initial documentation for cloudflare sdk #11145

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

AbhiPrasad
Copy link
Member

DESCRIBE YOUR PR

ref getsentry/sentry-javascript#13363

This PR adds docs for the Sentry Cloudflare SDK. It adds basic instructions for Cloudflare Workers, and Cloudflare Pages.

In follow-up PRs to this, I'll add framework specific guides.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

@AbhiPrasad AbhiPrasad requested review from andreiborza, a team and mydea and removed request for a team August 26, 2024 13:59
Copy link

vercel bot commented Aug 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
changelog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 26, 2024 4:09pm
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 26, 2024 4:09pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Aug 26, 2024 4:09pm

Copy link

codecov bot commented Aug 26, 2024

Bundle Report

Changes will increase total bundle size by 5.55kB ⬆️

Bundle name Size Change
sentry-docs-server 8.26MB 5.52kB ⬆️
sentry-docs-edge-server 254.34kB 3 bytes ⬇️
sentry-docs-client 6.26MB 31 bytes ⬆️

@@ -13,7 +13,8 @@ notSupported:
- javascript.hapi
- javascript.koa
- javascript.nestjs
- javascript.deno
- javascript.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidentally replaced deno here?

@@ -0,0 +1,8 @@
title: Cloudflare
description: 'Official Sentry SDK for Cloudflare Workers and Cloudflare Pages.'
sdk: sentry.javascript.bun
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sdk: sentry.javascript.bun
sdk: sentry.javascript.cloudflare

app.

```javascript
// functions/_middleware.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move that into the { filename } directive instead?

To use this SDK, wrap your handler with the `withSentry` function. This will initialize the SDK and hook into the
environment. Note that you can turn off almost all side effects using the respective options.

Currently only ESM handlers are supported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: I'd pack this into a <Note> and move it to after the snippet, wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I like that, will make the change.

<SignInNote />

```javascript
import * as Sentry from "@sentry/bun";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import * as Sentry from "@sentry/bun";
import * as Sentry from "@sentry/cloudflare";

app.

```javascript
// functions/_middleware.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion as above, can we move that into the { filename } directive instead?

To use this SDK, wrap your handler with the `withSentry` function. This will initialize the SDK and hook into the
environment. Note that you can turn off almost all side effects using the respective options.

Currently only ESM handlers are supported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: Same as above: I'd pack this into a <Note> and move it to after the snippet, wdyt?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants