Skip to content

feat(nuxt): Add Cloudflare Nitro plugin #15597

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

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Mar 5, 2025

⚠️ This PR is a work-in-progress and APIs and naming might change

A plugin which initializes Sentry when deployed to Cloudflare.

  1. Remove the previous server config file: sentry.server.config.ts
  2. Add a plugin in server/plugins (e.g. server/plugins/sentry-cloudflare-setup.ts)
  3. Add this code in your plugin file
    // server/plugins/sentry-cloudflare-setup.ts (filename does not matter)
    import { cloudflareNitroPlugin } from '@sentry/nuxt/module/plugins'
    
    export default defineNitroPlugin(cloudflareNitroPlugin({
        dsn: 'https://dsn',
        tracesSampleRate: 1.0,
    }))

@rth
Copy link

rth commented Apr 8, 2025

Thanks for working on this! By any chance you wouldn't have a suggestion on how to install this from github with pnpm? Tried,

pnpm add github:getsentry/sentry-javascript#sig/nuxt-cloudflare

but this installs the @sentry package not @sentry/nuxt..

@s1gr1d s1gr1d force-pushed the sig/nuxt-cloudflare branch from bc63ab4 to fc62672 Compare June 5, 2025 09:01
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.

2 participants