Skip to content

docs(nuxt): Add docs for Cloudflare Nitro plugin #14219

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

Merged
merged 4 commits into from
Jul 1, 2025

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Jul 1, 2025

DESCRIBE YOUR PR

Docs for getsentry/sentry-javascript#15597

closes getsentry/sentry-javascript#16780

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

Copy link

vercel bot commented Jul 1, 2025

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

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 2:09pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jul 1, 2025 2:09pm

@s1gr1d s1gr1d requested review from mydea, chargome and andreiborza July 1, 2025 11:45
Copy link

codecov bot commented Jul 1, 2025

Bundle Report

Changes will increase total bundle size by 865.2kB (4.1%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 11.8MB 865.2kB (7.91%) ⬆️
sentry-docs-client-array-push 9.8MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.64MB -0.0%
../instrumentation.js -3 bytes 973.36kB -0.0%
9523.js -3 bytes 949.31kB -0.0%
../app/[[...path]]/page.js.nft.json 288.4kB 692.68kB 71.34% ⚠️
../app/platform-redirect/page.js.nft.json 288.4kB 692.6kB 71.35% ⚠️
../app/sitemap.xml/route.js.nft.json 288.4kB 690.57kB 71.71% ⚠️
view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 873.24kB -0.0%
static/chunks/7750-*.js -3 bytes 415.85kB -0.0%
server/middleware-*.js 5.55kB 6.55kB 555.3% ⚠️
server/middleware-*.js -5.55kB 1.0kB -84.74%
static/LkTfUJVRpUyIYQsgBBiUp/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/LkTfUJVRpUyIYQsgBBiUp/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/52aXzu83oljX_aodPZEu3/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/52aXzu83oljX_aodPZEu3/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

@s1gr1d s1gr1d requested a review from inventarSarah July 1, 2025 12:10
Delete `sentry.server.config.ts` if it exists.

2. **Add a Nitro plugin:**
Create a new file in `server/plugins` (for example, `server/plugins/sentry-cloudflare-setup.ts`).
Copy link
Member

Choose a reason for hiding this comment

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

q: should we just be more opinionated here and just tell users to name it sentry-cloudflare-setup.ts?

Then we could consolidate step 2 and 3 together:

  1. Create a Nitro plugin:
    Create sentry-cloudflare-setup.ts in server/plugins:
    <code snippet here>

Copy link
Member Author

Choose a reason for hiding this comment

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

Same as comment above: #14219 (comment)

The file name does not matter but it's indeed smart to have one step less. If we want to write a filename to the docs, we could name it sentry.cloudflare.config.ts to be in line with sentry.server.config.ts?

Copy link
Member

Choose a reason for hiding this comment

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

I'd just call it sentry-cloudflare-plugin.ts, seems most sensible to me. Naming it sentry.cloudflare.config.ts makes me think it would just need a Sentry.init in there.

Copy link
Collaborator

@inventarSarah inventarSarah left a comment

Choose a reason for hiding this comment

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

LGTM 🐳!

I added some suggestions

@s1gr1d s1gr1d enabled auto-merge (squash) July 1, 2025 13:59
@s1gr1d s1gr1d merged commit ea17942 into master Jul 1, 2025
13 checks passed
@s1gr1d s1gr1d deleted the sig/nuxt-cloudflare-plugin branch July 1, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Nuxt] Create docs for Nitro Cloudflare plugin
4 participants