import type { CloudflareOptions } from '@sentry/cloudflare'; import type { NitroApp, NitroAppPlugin } from 'nitropack'; /** * Sentry Cloudflare Nitro plugin for when using the "cloudflare-pages" preset in Nuxt. * This plugin automatically sets up Sentry error monitoring and performance tracking for Cloudflare Pages projects. * * Instead of adding a `sentry.server.config.ts` file, export this plugin in the `server/plugins` directory * with the necessary Sentry options to enable Sentry for your Cloudflare Pages project. * * * @example Basic usage * ```ts * // nitro/plugins/sentry.ts * import { defineNitroPlugin } from '#imports' * import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins' * * export default defineNitroPlugin(sentryCloudflareNitroPlugin({ * dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0', * tracesSampleRate: 1.0, * })); * ``` * * @example Dynamic configuration with nitroApp * ```ts * // nitro/plugins/sentry.ts * import { defineNitroPlugin } from '#imports' * import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins' * * export default defineNitroPlugin(sentryCloudflareNitroPlugin(nitroApp => ({ * dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0', * debug: nitroApp.h3App.options.debug * }))); * ``` */ export declare const sentryCloudflareNitroPlugin: (optionsOrFn: CloudflareOptions | ((nitroApp: NitroApp) => CloudflareOptions)) => NitroAppPlugin;