diff --git a/docs/platforms/javascript/common/configuration/integrations/breadcrumbs.mdx b/docs/platforms/javascript/common/configuration/integrations/breadcrumbs.mdx index 04578a56f4bc2..170fc2ad8044e 100644 --- a/docs/platforms/javascript/common/configuration/integrations/breadcrumbs.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/breadcrumbs.mdx @@ -14,6 +14,7 @@ notSupported: - javascript.koa - javascript.nestjs - javascript.deno + - javascript.cloudflare - javascript.bun --- diff --git a/docs/platforms/javascript/common/configuration/integrations/browserapierrors.mdx b/docs/platforms/javascript/common/configuration/integrations/browserapierrors.mdx index 474201b8ad7bc..47c38351d0d9e 100644 --- a/docs/platforms/javascript/common/configuration/integrations/browserapierrors.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/browserapierrors.mdx @@ -14,6 +14,7 @@ notSupported: - javascript.koa - javascript.nestjs - javascript.deno + - javascript.cloudflare - javascript.bun --- diff --git a/docs/platforms/javascript/common/configuration/integrations/browserprofiling.mdx b/docs/platforms/javascript/common/configuration/integrations/browserprofiling.mdx index e0d5bc24ccdfe..c6c2578fc2153 100644 --- a/docs/platforms/javascript/common/configuration/integrations/browserprofiling.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/browserprofiling.mdx @@ -14,6 +14,7 @@ notSupported: - javascript.koa - javascript.nestjs - javascript.deno + - javascript.cloudflare - javascript.bun --- diff --git a/docs/platforms/javascript/common/configuration/integrations/browsertracing.mdx b/docs/platforms/javascript/common/configuration/integrations/browsertracing.mdx index a8014ea930b03..375314250c1b8 100644 --- a/docs/platforms/javascript/common/configuration/integrations/browsertracing.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/browsertracing.mdx @@ -14,6 +14,7 @@ notSupported: - javascript.koa - javascript.nestjs - javascript.deno + - javascript.cloudflare - javascript.bun --- diff --git a/docs/platforms/javascript/common/configuration/integrations/console.mdx b/docs/platforms/javascript/common/configuration/integrations/console.mdx index fd860e6763bc8..aa56ad6c561f3 100644 --- a/docs/platforms/javascript/common/configuration/integrations/console.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/console.mdx @@ -21,6 +21,7 @@ supported: - javascript.astro - javascript.bun - javascript.deno + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/configuration/integrations/contextlines.mdx b/docs/platforms/javascript/common/configuration/integrations/contextlines.mdx index db2fb2b47bffb..5deab8b01d9a1 100644 --- a/docs/platforms/javascript/common/configuration/integrations/contextlines.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/contextlines.mdx @@ -14,6 +14,7 @@ notSupported: - javascript.koa - javascript.nestjs - javascript.deno + - javascript.cloudflare - javascript.bun --- diff --git a/docs/platforms/javascript/common/configuration/integrations/httpclient.mdx b/docs/platforms/javascript/common/configuration/integrations/httpclient.mdx index cc217eb762d41..ac0577c0edc46 100644 --- a/docs/platforms/javascript/common/configuration/integrations/httpclient.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/httpclient.mdx @@ -13,6 +13,7 @@ notSupported: - javascript.koa - javascript.nestjs - javascript.deno + - javascript.cloudflare - javascript.bun --- diff --git a/docs/platforms/javascript/common/configuration/integrations/httpcontext.mdx b/docs/platforms/javascript/common/configuration/integrations/httpcontext.mdx index 9f2f312feb982..4448b2d363097 100644 --- a/docs/platforms/javascript/common/configuration/integrations/httpcontext.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/httpcontext.mdx @@ -14,6 +14,7 @@ notSupported: - javascript.koa - javascript.nestjs - javascript.deno + - javascript.cloudflare - javascript.bun --- diff --git a/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx b/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx index 587d68e0fb042..f9bc5ac29a525 100644 --- a/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx @@ -20,6 +20,7 @@ supported: - javascript.remix - javascript.astro - javascript.bun + - javascript.cloudflare - javascript.deno --- diff --git a/docs/platforms/javascript/common/configuration/integrations/modulemetadata.mdx b/docs/platforms/javascript/common/configuration/integrations/modulemetadata.mdx index 988b219ef6d1f..958eaaa7feb30 100644 --- a/docs/platforms/javascript/common/configuration/integrations/modulemetadata.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/modulemetadata.mdx @@ -15,8 +15,7 @@ notSupported: - javascript.nestjs - javascript.deno - javascript.bun - - javascript.deno - - javascript.bun + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/configuration/integrations/modules.mdx b/docs/platforms/javascript/common/configuration/integrations/modules.mdx index 27c07920461b8..21100c9b691da 100644 --- a/docs/platforms/javascript/common/configuration/integrations/modules.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/modules.mdx @@ -21,6 +21,7 @@ supported: - javascript.astro - javascript.bun - javascript.deno + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/configuration/integrations/onuncaughtexception.mdx b/docs/platforms/javascript/common/configuration/integrations/onuncaughtexception.mdx index 33b1ab28e8af4..e6134f5168320 100644 --- a/docs/platforms/javascript/common/configuration/integrations/onuncaughtexception.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/onuncaughtexception.mdx @@ -21,6 +21,7 @@ supported: - javascript.astro - javascript.bun - javascript.deno + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/configuration/integrations/replay.mdx b/docs/platforms/javascript/common/configuration/integrations/replay.mdx index 8e0a284ed03ee..b8e6af33fc617 100644 --- a/docs/platforms/javascript/common/configuration/integrations/replay.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/replay.mdx @@ -16,8 +16,7 @@ notSupported: - javascript.hapi - javascript.koa - javascript.nestjs - - javascript.deno - - javascript.bun + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/configuration/integrations/replaycanvas.mdx b/docs/platforms/javascript/common/configuration/integrations/replaycanvas.mdx index bb269451450f8..ed09e40d9c957 100644 --- a/docs/platforms/javascript/common/configuration/integrations/replaycanvas.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/replaycanvas.mdx @@ -16,8 +16,7 @@ notSupported: - javascript.hapi - javascript.koa - javascript.nestjs - - javascript.deno - - javascript.bun + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/configuration/integrations/reportingobserver.mdx b/docs/platforms/javascript/common/configuration/integrations/reportingobserver.mdx index b471db8f537d5..4db9ab5f8989e 100644 --- a/docs/platforms/javascript/common/configuration/integrations/reportingobserver.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/reportingobserver.mdx @@ -14,6 +14,7 @@ notSupported: - javascript.nestjs - javascript.deno - javascript.bun + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/configuration/integrations/requestdata.mdx b/docs/platforms/javascript/common/configuration/integrations/requestdata.mdx index 0e7b6ccbe9113..ac25fbe09efb0 100644 --- a/docs/platforms/javascript/common/configuration/integrations/requestdata.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/requestdata.mdx @@ -20,8 +20,7 @@ supported: - javascript.sveltekit - javascript.remix - javascript.astro - - javascript.bun - - javascript.deno + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/configuration/integrations/trpc.mdx b/docs/platforms/javascript/common/configuration/integrations/trpc.mdx index 22d27f7f72722..d188498d6f9f5 100644 --- a/docs/platforms/javascript/common/configuration/integrations/trpc.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/trpc.mdx @@ -21,6 +21,7 @@ supported: - javascript.astro - javascript.deno - javascript.bun + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/configuration/integrations/unhandledrejection.mdx b/docs/platforms/javascript/common/configuration/integrations/unhandledrejection.mdx index 30f3cd73df403..a2835696c4627 100644 --- a/docs/platforms/javascript/common/configuration/integrations/unhandledrejection.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/unhandledrejection.mdx @@ -21,6 +21,7 @@ supported: - javascript.astro - javascript.bun - javascript.deno + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/crons/index.mdx b/docs/platforms/javascript/common/crons/index.mdx index 81da413d1a958..17bb31528595f 100644 --- a/docs/platforms/javascript/common/crons/index.mdx +++ b/docs/platforms/javascript/common/crons/index.mdx @@ -20,11 +20,12 @@ supported: - javascript.koa - javascript.nestjs - javascript.nuxt + - javascript.cloudflare --- Once implemented, it'll allow you to get alerts and metrics to help you solve errors, detect timeouts, and prevent disruptions to your service. - + ## Requirements @@ -34,7 +35,7 @@ Once implemented, it'll allow you to get alerts and metrics to help you solve er - + ## Requirements diff --git a/docs/platforms/javascript/common/crons/troubleshooting.mdx b/docs/platforms/javascript/common/crons/troubleshooting.mdx index bd0fe2a75331a..299c75a57b95d 100644 --- a/docs/platforms/javascript/common/crons/troubleshooting.mdx +++ b/docs/platforms/javascript/common/crons/troubleshooting.mdx @@ -20,6 +20,7 @@ supported: - javascript.koa - javascript.nestjs - javascript.nuxt + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/install/index.mdx b/docs/platforms/javascript/common/install/index.mdx index 310eb6c885752..523fb6b62903e 100644 --- a/docs/platforms/javascript/common/install/index.mdx +++ b/docs/platforms/javascript/common/install/index.mdx @@ -25,6 +25,7 @@ notSupported: - javascript.aws-lambda - javascript.azure-functions - javascript.gcp-functions + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/install/loader.mdx b/docs/platforms/javascript/common/install/loader.mdx index f334c7cc6d6df..9dae91369a5c3 100644 --- a/docs/platforms/javascript/common/install/loader.mdx +++ b/docs/platforms/javascript/common/install/loader.mdx @@ -30,6 +30,7 @@ notSupported: - javascript.hapi - javascript.koa - javascript.nestjs + - javascript.cloudflare --- The Loader Script is the easiest way to initialize the Sentry SDK. The Loader Script also automatically keeps your Sentry SDK up to date and offers configuration for different Sentry features. diff --git a/docs/platforms/javascript/common/install/npm.mdx b/docs/platforms/javascript/common/install/npm.mdx index 6e55840629422..e800ac7b704d6 100644 --- a/docs/platforms/javascript/common/install/npm.mdx +++ b/docs/platforms/javascript/common/install/npm.mdx @@ -32,6 +32,7 @@ notSupported: - javascript.hapi - javascript.koa - javascript.nestjs + - javascript.cloudflare --- diff --git a/docs/platforms/javascript/common/profiling/index.mdx b/docs/platforms/javascript/common/profiling/index.mdx index 1816a9e6f3791..5088dc921cc53 100644 --- a/docs/platforms/javascript/common/profiling/index.mdx +++ b/docs/platforms/javascript/common/profiling/index.mdx @@ -7,6 +7,7 @@ notSupported: - javascript.bun - javascript.cordova - javascript.deno + - javascript.cloudflare description: "Collect & view performance insights for JavaScript programs with Sentry’s JavaScript Profiling integration. Get started with browser profiling here." --- diff --git a/docs/platforms/javascript/common/session-replay/configuration.mdx b/docs/platforms/javascript/common/session-replay/configuration.mdx index 6faf4598ddb8a..f8942c516459e 100644 --- a/docs/platforms/javascript/common/session-replay/configuration.mdx +++ b/docs/platforms/javascript/common/session-replay/configuration.mdx @@ -16,6 +16,7 @@ notSupported: - javascript.hapi - javascript.koa - javascript.nestjs + - javascript.cloudflare description: "Learn about the general Session Replay configuration fields." --- diff --git a/docs/platforms/javascript/common/session-replay/index.mdx b/docs/platforms/javascript/common/session-replay/index.mdx index b6c9cb73993a6..189ef1d6a579a 100644 --- a/docs/platforms/javascript/common/session-replay/index.mdx +++ b/docs/platforms/javascript/common/session-replay/index.mdx @@ -16,6 +16,7 @@ notSupported: - javascript.hapi - javascript.koa - javascript.nestjs + - javascript.cloudflare description: "Learn how to enable Session Replay in your app if it is not already set up." --- @@ -44,7 +45,7 @@ To set up the integration, add the following to your Sentry initialization. Ther fallbackPlatform="javascript" /> - + ### Canvas Recording diff --git a/docs/platforms/javascript/common/session-replay/issue-types.mdx b/docs/platforms/javascript/common/session-replay/issue-types.mdx index c55ea5a4250be..28e336e122779 100644 --- a/docs/platforms/javascript/common/session-replay/issue-types.mdx +++ b/docs/platforms/javascript/common/session-replay/issue-types.mdx @@ -16,6 +16,7 @@ notSupported: - javascript.hapi - javascript.koa - javascript.nestjs + - javascript.cloudflare description: "Learn about the Issue types that Session Replay can detect." --- @@ -32,7 +33,8 @@ You can configure which issue types are created by visiting Project Settings > R Sometimes rage or dead clicks will be detected on elements which are not expected to mutate the DOM, like a "Print" or "Download" button. In this case, you can configure `slowClickIgnoreSelectors`, which will prevent those buttons from generating new issues. -You'll need to have SDK version 7.60.1 or higher in order to be able to see **rage click issues**. + You'll need to have SDK version 7.60.1 or higher in order to be able to see + **rage click issues**. ## Configuring Hydration Errors @@ -52,5 +54,6 @@ You can have your preferences configured in one of four ways: | disabled | disabled | Issue created from captured error data. | -You'll need to have SDK version 7.87.0 or higher in order to be able to detect **hydration error issues** from replay data. + You'll need to have SDK version 7.87.0 or higher in order to be able to detect + **hydration error issues** from replay data. diff --git a/docs/platforms/javascript/common/session-replay/privacy.mdx b/docs/platforms/javascript/common/session-replay/privacy.mdx index 35d8686b885fc..a557f8ca9228a 100644 --- a/docs/platforms/javascript/common/session-replay/privacy.mdx +++ b/docs/platforms/javascript/common/session-replay/privacy.mdx @@ -16,6 +16,7 @@ notSupported: - javascript.hapi - javascript.koa - javascript.nestjs + - javascript.cloudflare description: "Configuring Session Replay to maintain user and data privacy." --- diff --git a/docs/platforms/javascript/common/session-replay/troubleshooting.mdx b/docs/platforms/javascript/common/session-replay/troubleshooting.mdx index 5c660e7cd67ca..d6002fb0e8746 100644 --- a/docs/platforms/javascript/common/session-replay/troubleshooting.mdx +++ b/docs/platforms/javascript/common/session-replay/troubleshooting.mdx @@ -16,6 +16,7 @@ notSupported: - javascript.hapi - javascript.koa - javascript.nestjs + - javascript.cloudflare excerpt: "" description: "Troubleshooting Session Replay-specific Issues" --- @@ -31,6 +32,7 @@ If you are on a supported SDK version and your `canvas` elements still aren't ge The integration needs to enable `preserveDrawingBuffer` to export images from 3D and WebGL canvases. This can negatively affect canvas performance. If your canvas application is impacted by enabling `preserveDrawingBuffer`, you'll need to enable manual snapshotting and call a `snapshot()` method inside of your re-paint loop. + @@ -48,7 +50,7 @@ Due to [browser limitations](https://developer.mozilla.org/en-US/docs/Web/SVG/El -There might be fewer rage clicks than you expect if the user stopped waiting for the site to respond before the 7 second threshold. This is why the rage click issues that you *do* see are so valuable, because the user that clicked at least 3 times and continued waiting at least 7 seconds for the site to respond is likely very frustrated. +There might be fewer rage clicks than you expect if the user stopped waiting for the site to respond before the 7 second threshold. This is why the rage click issues that you _do_ see are so valuable, because the user that clicked at least 3 times and continued waiting at least 7 seconds for the site to respond is likely very frustrated. You might also see more rage clicks than you expected from buttons that don't trigger a DOM mutation or page scroll (such as "Print" and "Download" buttons). There is no reliable way for the SDK to detect that a download or print has initiated, so a slow click might be generated even if the button is not actually "dead". For these cases, you can configure the SDK via `slowClickIgnoreSelectors` - see [Configuration](/platforms/javascript/session-replay/configuration/) for more details. @@ -66,7 +68,6 @@ Sentry.replayIntegration({ - By default, Replay will capture basic information about all outgoing fetch and XHR requests in your application. This includes the URL, request and response body size, method, and status code. @@ -103,6 +104,7 @@ We're always working on ways to reduce the bundle size. Additionally, there are The Sentry SDK attempts to minimize potential [performance overhead](/product/explore/session-replay/performance-overhead/#how-is-session-replay-optimized) in a few different ways. For example, by keeping track of the number of DOM mutations that are happening then disabling recording when a large number of changes are detected. Many simultaneous mutations can slow down a web page whether Session Replay is installed or not, but when a large number of mutations happen, the Replay client can incur an additional slowdown because it records each change. If you're seeing the "A large number of mutations was detected" message while watching a replay, it means that your page could be optimized. For example, a dropdown list with thousands of entries could be refactored so that rows are virtualized where only the visible rows are rendered in the DOM. Another potential solution is to paginate the results fetch more data as the user scrolls through it. The SDK has a configuration that allows you to configure the limits before recording stops. + @@ -142,7 +144,11 @@ With this configuration, Replay is able to capture response bodies from Apollo C -Using the [`captureConsoleIntegration`](https://docs.sentry.io/platforms/javascript/configuration/integrations/captureconsole/) can cause replays to record as if you have triggered an exception. You can use [`beforeErrorSampling`](https://docs.sentry.io/platforms/javascript/guides/sveltekit/session-replay/understanding-sessions/#ignore-certain-errors-for-error-sampling) to avoid this behavior. + Using the + [`captureConsoleIntegration`](https://docs.sentry.io/platforms/javascript/configuration/integrations/captureconsole/) + can cause replays to record as if you have triggered an exception. You can use + [`beforeErrorSampling`](https://docs.sentry.io/platforms/javascript/guides/sveltekit/session-replay/understanding-sessions/#ignore-certain-errors-for-error-sampling) + to avoid this behavior. @@ -150,4 +156,5 @@ Using the [`captureConsoleIntegration`](https://docs.sentry.io/platforms/javascr There are certain cases (such as clicking a button to play an audio clip) where Sentry incorrectly records a click as a dead click (note: rage clicks are a subset of dead clicks). As a workaround, you can use the [`slowClickIgnoreSelector`](/platforms/javascript/session-replay/configuration/#general-integration-configuration) configuration option to ignore dead clicks for specific selectors. If you want to turn off [rage click issues](/product/issues/issue-details/replay-issues/) altogether, you can disable them by going to the **Settings** page in Sentry, clicking "Projects", and selecting the project for which you want to disable rage clicks. From here, select "Replays" under the "PROCESSING" heading and toggle off "Create Rage Click Issues". + diff --git a/docs/platforms/javascript/common/session-replay/understanding-sessions.mdx b/docs/platforms/javascript/common/session-replay/understanding-sessions.mdx index 285f160c85c71..52dc0004d355b 100644 --- a/docs/platforms/javascript/common/session-replay/understanding-sessions.mdx +++ b/docs/platforms/javascript/common/session-replay/understanding-sessions.mdx @@ -16,6 +16,7 @@ notSupported: - javascript.hapi - javascript.koa - javascript.nestjs + - javascript.cloudflare description: "Learn about customizing sessions with the Session Replay SDK." --- @@ -198,7 +199,6 @@ replayIntegration({ If you return `false` from this method for a given error, we will not check the error sample rate for this error. If you return `true`, we will continue to check the error sample rate as normal. - ### Connect Replays with Support Software Replays do not need to be connected to an application error, they can also be used to supplement your support tickets. @@ -227,13 +227,13 @@ Sentry.init({ * Your widget will need to have an event/hook to trigger flushing the replay to * Sentry. */ -MySupportWidget.on('open', () => { +MySupportWidget.on("open", () => { const replay = Sentry.getReplay(); // Send replay to Sentry replay.flush(); // Retrieve the replay id that was saved and attach it to your support widget const replayId = replay.getReplayId(); - MySupportWidget.setTag('replayId', replayId); + MySupportWidget.setTag("replayId", replayId); }); /** diff --git a/docs/platforms/javascript/common/tracing/index.mdx b/docs/platforms/javascript/common/tracing/index.mdx index f2b666d6f5436..b2d220045163e 100644 --- a/docs/platforms/javascript/common/tracing/index.mdx +++ b/docs/platforms/javascript/common/tracing/index.mdx @@ -13,7 +13,9 @@ If you’re adopting Tracing in a high-throughput environment, we recommend test - + Sentry can integrate with OpenTelemetry. You can find more information about it diff --git a/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/caches-module.mdx b/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/caches-module.mdx index 915d835a463c3..a9602343b1545 100644 --- a/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/caches-module.mdx +++ b/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/caches-module.mdx @@ -21,6 +21,7 @@ supported: - javascript.solidstart - javascript.sveltekit - javascript.remix + - javascript.cloudflare --- A cache can be used to speed up data retrieval, thereby improving application performance. Because instead of getting data from a potentially slow data layer, your application will be getting data from memory (in a best case scenario). Caching can speed up read-heavy workloads for applications like Q&A portals, gaming, media sharing, and social networking. @@ -35,10 +36,10 @@ If you're using a Redis client like `ioredis` or `redis` to cache your data, it Sentry.init({ integrations: [ redisIntegration({ - cachePrefixes: ['posts:', 'authors:'] - }) - ] -}) + cachePrefixes: ["posts:", "authors:"], + }), + ], +}); ``` ## Manual Instrumentation diff --git a/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/queues-module.mdx b/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/queues-module.mdx index b5662015516e3..f88ebdb58a6ca 100644 --- a/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/queues-module.mdx +++ b/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/queues-module.mdx @@ -21,6 +21,7 @@ supported: - javascript.solidstart - javascript.sveltekit - javascript.remix + - javascript.cloudflare --- To ensure that you have performance data about your messaging queues, you'll need to instrument custom spans and transactions around your queue producers and consumers. diff --git a/docs/platforms/javascript/common/user-feedback/index.mdx b/docs/platforms/javascript/common/user-feedback/index.mdx index b66b6a286dd90..029ec9bd65d7b 100644 --- a/docs/platforms/javascript/common/user-feedback/index.mdx +++ b/docs/platforms/javascript/common/user-feedback/index.mdx @@ -8,7 +8,7 @@ The User Feedback feature allows you to collect user feedback from anywhere insi Note that if you're using a self-hosted Sentry instance, you'll need to be on version 24.4.2 or higher in order to use the full functionality of the User Feedback feature. Lower versions may have limited functionality. - + ## User Feedback Widget @@ -16,7 +16,6 @@ The embeddable JavaScript widget allows users to submit feedback from anywhere i ![An example feedback image of the User Feedback Widget on a demo site](./img/user-feedback-widget.png) - ### Pre-requisites @@ -38,12 +37,14 @@ By default, this will insert the widget into the bottom right corner of your web On SDK version 8.0.0 and above, users can send screenshots with their feedback. If you're self-hosting, you also need release 24.4.2 and above. You can configure this using the `enableScreenshot` option, by default it is set to `true`. Screenshots aren't supported on mobile devices, so the screenshot button will be hidden automatically in this case. - Screenshots use your [attachments quota](/pricing/quotas/manage-attachments-quota). All plans come with 1GB of attachments, which is approxiamately 2500 screenshots. + Screenshots use your [attachments + quota](/pricing/quotas/manage-attachments-quota). All plans come with 1GB of + attachments, which is approxiamately 2500 screenshots. ### Session Replay -The User Feedback widget integrates easily with Session Replay. First, make sure that the Session Replay integration is configured correctly and that `replaysOnErrorSampleRate` is greater than 0. When this is done, the Replay SDK will buffer up to 30 seconds of the user's session until the user *opens* the User Feedback widget. If the user submits feedback, you'll be able to view the feedback (including the replay), in sentry.io. +The User Feedback widget integrates easily with Session Replay. First, make sure that the Session Replay integration is configured correctly and that `replaysOnErrorSampleRate` is greater than 0. When this is done, the Replay SDK will buffer up to 30 seconds of the user's session until the user _opens_ the User Feedback widget. If the user submits feedback, you'll be able to view the feedback (including the replay), in sentry.io. diff --git a/docs/platforms/javascript/guides/cloudflare/config.yml b/docs/platforms/javascript/guides/cloudflare/config.yml new file mode 100644 index 0000000000000..5f4308c7eab38 --- /dev/null +++ b/docs/platforms/javascript/guides/cloudflare/config.yml @@ -0,0 +1,8 @@ +title: Cloudflare +description: 'Official Sentry SDK for Cloudflare Workers and Cloudflare Pages.' +sdk: sentry.javascript.cloudflare +categories: + - javascript + - server + - server-edge + - serverless diff --git a/docs/platforms/javascript/guides/cloudflare/features/d1.mdx b/docs/platforms/javascript/guides/cloudflare/features/d1.mdx new file mode 100644 index 0000000000000..c389cb7ca2311 --- /dev/null +++ b/docs/platforms/javascript/guides/cloudflare/features/d1.mdx @@ -0,0 +1,16 @@ +--- +title: Cloudflare D1 Instrumentation +description: "Learn how to add span instrumentation for Cloudflare D1." +--- + +You can use the `instrumentD1WithSentry` method to instrument [Cloudflare D1](https://developers.cloudflare.com/d1/), +Cloudflare's serverless SQL database with Sentry. + +```javascript +import * as Sentry from "@sentry/cloudflare"; + +// env.DB is the D1 DB binding configured in your `wrangler.toml` +const db = Sentry.instrumentD1WithSentry(env.DB); +// Now you can use the database as usual +await db.prepare("SELECT * FROM table WHERE id = ?").bind(1).run(); +``` diff --git a/docs/platforms/javascript/guides/cloudflare/features/index.mdx b/docs/platforms/javascript/guides/cloudflare/features/index.mdx new file mode 100644 index 0000000000000..8cd1e422d476f --- /dev/null +++ b/docs/platforms/javascript/guides/cloudflare/features/index.mdx @@ -0,0 +1,8 @@ +--- +title: Cloudflare Features +description: "Learn how Sentry's Cloudflare SDK exposes features for first class integration with Cloudflare." +--- + +The Sentry Cloudflare SDK offers Cloudflare-specific features for first class integration with Cloudflare products and the Cloudflare workers runtime. + + diff --git a/platform-includes/capture-error/javascript.cloudflare.mdx b/platform-includes/capture-error/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..214ceaf4ca8a9 --- /dev/null +++ b/platform-includes/capture-error/javascript.cloudflare.mdx @@ -0,0 +1,11 @@ +You can pass an `Error` object to `captureException()` to have it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. + +```javascript +import * as Sentry from "@sentry/cloudflare"; + +try { + aFunctionThatMightFail(); +} catch (e) { + Sentry.captureException(e); +} +``` diff --git a/platform-includes/configuration/capture-console/javascript.cloudflare.mdx b/platform-includes/configuration/capture-console/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..ef5b410135a04 --- /dev/null +++ b/platform-includes/configuration/capture-console/javascript.cloudflare.mdx @@ -0,0 +1,10 @@ + + +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.captureConsoleIntegration()], +}); +``` diff --git a/platform-includes/configuration/contextlines/javascript.cloudflare.mdx b/platform-includes/configuration/contextlines/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..38786e350aaf0 --- /dev/null +++ b/platform-includes/configuration/contextlines/javascript.cloudflare.mdx @@ -0,0 +1,10 @@ + + +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.contextLinesIntegration()], +}); +``` diff --git a/platform-includes/configuration/debug/javascript.bun.mdx b/platform-includes/configuration/debug/javascript.bun.mdx index 0c432dca1e359..2a5e5d92129c6 100644 --- a/platform-includes/configuration/debug/javascript.bun.mdx +++ b/platform-includes/configuration/debug/javascript.bun.mdx @@ -1,7 +1,7 @@ ```javascript {tabTitle: JavaScript} -import * as Sentry from "@sentry/node"; +import * as Sentry from "@sentry/bun"; Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/configuration/debug/javascript.cloudflare.mdx b/platform-includes/configuration/debug/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..1aa3e7001119e --- /dev/null +++ b/platform-includes/configuration/debug/javascript.cloudflare.mdx @@ -0,0 +1,10 @@ + + +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.debugIntegration()], +}); +``` diff --git a/platform-includes/configuration/dedupe/javascript.cloudflare.mdx b/platform-includes/configuration/dedupe/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..36832ac0b4368 --- /dev/null +++ b/platform-includes/configuration/dedupe/javascript.cloudflare.mdx @@ -0,0 +1,10 @@ + + +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.dedupeIntegration()], +}); +``` diff --git a/platform-includes/configuration/extra-error-data/javascript.cloudflare.mdx b/platform-includes/configuration/extra-error-data/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..471980eaafd18 --- /dev/null +++ b/platform-includes/configuration/extra-error-data/javascript.cloudflare.mdx @@ -0,0 +1,10 @@ + + +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.extraErrorDataIntegration()], +}); +``` diff --git a/platform-includes/configuration/integrations/javascript.cloudflare.mdx b/platform-includes/configuration/integrations/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..c3c7588a4d3d0 --- /dev/null +++ b/platform-includes/configuration/integrations/javascript.cloudflare.mdx @@ -0,0 +1,15 @@ +### Integrations + +| | **Auto Enabled** | **Errors** | **Performance** | **Cron** | **Additional Context** | +| ---------------------------------------------------- | :--------------: | :--------: | :-------------: | :------: | :--------------------: | +| [`dedupeIntegration`](./dedupe) | ✓ | ✓ | | | | +| [`fetchIntegration`](./fetchIntegration) | ✓ | ✓ | ✓ | | | +| [`functionToStringIntegration`](./functiontostring) | ✓ | | | | | +| [`inboundFiltersIntegration`](./inboundfilters) | ✓ | ✓ | | | | +| [`linkedErrorsIntegration`](./linkederrors) | ✓ | ✓ | | | | +| [`requestDataIntegration`](./requestDataIntegration) | ✓ | | | | ✓ | +| [`captureConsoleIntegration`](./captureconsole) | | | | | ✓ | +| [`debugIntegration`](./debug) | | | | | | +| [`extraErrorDataIntegration`](./extraerrordata) | | | | | ✓ | +| [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | | +| [`sessionTimingIntegration`](./sessiontiming) | | | | | ✓ | diff --git a/platform-includes/configuration/rewrite-frames/javascript.cloudflare.mdx b/platform-includes/configuration/rewrite-frames/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..04e437f43ec87 --- /dev/null +++ b/platform-includes/configuration/rewrite-frames/javascript.cloudflare.mdx @@ -0,0 +1,21 @@ + + +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.rewriteFramesIntegration( + { + // root path that will be stripped from the current frame's filename by the default iteratee if the filename is an absolute path + root: string; + + // a custom prefix that will be used by the default iteratee (default: `app://`) + prefix: string; + + // function that takes the frame, applies a transformation, and returns it + iteratee: (frame) => frame; + } + )], +}); +``` diff --git a/platform-includes/configuration/sessiontiming/javascript.cloudflare.mdx b/platform-includes/configuration/sessiontiming/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..c3437412f4c49 --- /dev/null +++ b/platform-includes/configuration/sessiontiming/javascript.cloudflare.mdx @@ -0,0 +1,10 @@ + + +```javascript {tabTitle: JavaScript} +import * as Sentry from "@sentry/cloudflare"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.sessionTimingIntegration()], +}); +``` diff --git a/platform-includes/crons/setup/javascript.cloudflare.mdx b/platform-includes/crons/setup/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..c51440a988a45 --- /dev/null +++ b/platform-includes/crons/setup/javascript.cloudflare.mdx @@ -0,0 +1,11 @@ +## Job Monitoring + + + +## Check-Ins + + + +## Upserting Cron Monitors + + diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.cloudflare.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..c9216191c31e2 --- /dev/null +++ b/platform-includes/distributed-tracing/how-to-use/javascript.cloudflare.mdx @@ -0,0 +1,18 @@ +The Sentry Cloudflare SDK has out of the box support for distributed tracing if you've setup the SDK to send traces. + +### Custom Instrumentation + +If you don't want to use tracing, you can set up Custom Instrumentation for distributed tracing. + +### Disabling Distributed Tracing + +If you want to disable distributed tracing, set the `tracePropagationTargets` option to be an empty array. This will ensure no trace headers are sent. + +```javascript +Sentry.init({ + dsn: "___PUBLIC_DSN___", + + // Overwrite the defaults to ensure no trace headers are sent + tracePropagationTargets: [], +}); +``` diff --git a/platform-includes/enriching-events/import/javascript.cloudflare.mdx b/platform-includes/enriching-events/import/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..28acd8ed075bd --- /dev/null +++ b/platform-includes/enriching-events/import/javascript.cloudflare.mdx @@ -0,0 +1,3 @@ +```javascript +import * as Sentry from "@sentry/cloudflare"; +``` diff --git a/platform-includes/getting-started-config/javascript.cloudflare.mdx b/platform-includes/getting-started-config/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..ee7974fdff688 --- /dev/null +++ b/platform-includes/getting-started-config/javascript.cloudflare.mdx @@ -0,0 +1,56 @@ +To use the SDK, you'll need to set either the `nodejs_compat` or `nodejs_als` compatibility flags in your `wrangler.toml`. This is because the SDK +needs access to the `AsyncLocalStorage` API to work correctly. + +```toml {filename:wrangler.toml} +compatibility_flags = ["nodejs_compat"] +# compatibility_flags = ["nodejs_als"] +``` + +Then you can install the SDK and add it to your project: + +You can either setup up the SDK for [Cloudflare Pages](#setup-cloudflare-pages) or +[Cloudflare Workers](#setup-cloudflare-workers). + +### Setup (Cloudflare Pages) + +To use this SDK, add the `sentryPagesPlugin` as +[middleware to your Cloudflare Pages application](https://developers.cloudflare.com/pages/functions/middleware/). + +We recommend adding a `functions/_middleware.js` for the middleware setup so that Sentry is initialized for your entire +app. + +```javascript {filename:functions/_middleware.js} +import * as Sentry from "@sentry/cloudflare"; + +export const onRequest = [ + // Make sure Sentry is the first middleware + Sentry.sentryPagesPlugin((context) => ({ + dsn: "___PUBLIC_DSN___", + // Set tracesSampleRate to 1.0 to capture 100% of spans for tracing. + tracesSampleRate: 1.0, + })), + // Add more middlewares here +]; +``` + +### Setup (Cloudflare Workers) + +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. + +```javascript +import * as Sentry from '@sentry/cloudflare'; + +export default withSentry( + env => ({ + dsn: "___PUBLIC_DSN___", + // Set tracesSampleRate to 1.0 to capture 100% of spans for tracing. + tracesSampleRate: 1.0, + }), + { + async fetch(request, env, ctx) { + return new Response('Hello World!'); + }, + } satisfies ExportedHandler, +); +``` diff --git a/platform-includes/getting-started-install/javascript.cloudflare.mdx b/platform-includes/getting-started-install/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..d5cf6776c8550 --- /dev/null +++ b/platform-includes/getting-started-install/javascript.cloudflare.mdx @@ -0,0 +1,11 @@ +```bash {tabTitle:npm} +npm install @sentry/cloudflare --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/cloudflare +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/cloudflare +``` diff --git a/platform-includes/getting-started-sourcemaps/javascript.bun.mdx b/platform-includes/getting-started-sourcemaps/javascript.bun.mdx deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/platform-includes/getting-started-sourcemaps/javascript.cloudflare.mdx b/platform-includes/getting-started-sourcemaps/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..2f270dac6e2a9 --- /dev/null +++ b/platform-includes/getting-started-sourcemaps/javascript.cloudflare.mdx @@ -0,0 +1,13 @@ +## Add Readable Stack Traces to Errors + +Depending on how you've set up your project, the stack traces in your Sentry errors probably don't look like your actual code. + +To fix this, upload your source maps to Sentry. + +To start, add `upload_source_maps = true` to your `wrangler.toml` file to enable source map uploading. + +Then run the Sentry Wizard to finish your set up: + + + +For more information on source maps or for more options to upload them, head over to our Source Maps documentation. diff --git a/platform-includes/getting-started-verify/javascript.cloudflare.mdx b/platform-includes/getting-started-verify/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..016a3624fd4f3 --- /dev/null +++ b/platform-includes/getting-started-verify/javascript.cloudflare.mdx @@ -0,0 +1,7 @@ +Verify your setup by adding the following snippet anywhere in your code and running it: + +```javascript +setTimeout(() => { + throw new Error(); +}); +``` diff --git a/platform-includes/performance/configure-sample-rate/javascript.cloudflare.mdx b/platform-includes/performance/configure-sample-rate/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..d85bc18cdcb9b --- /dev/null +++ b/platform-includes/performance/configure-sample-rate/javascript.cloudflare.mdx @@ -0,0 +1,40 @@ + + +## Cloudflare Pages + +```javascript {filename:functions/_middleware.js} +import * as Sentry from "@sentry/cloudflare"; + +export const onRequest = [ + Sentry.sentryPagesPlugin((context) => ({ + dsn: "___PUBLIC_DSN___", + // To set a uniform sample rate + tracesSampleRate: 0.2 + + // Alternatively, to control sampling dynamically + tracesSampler: samplingContext => { ... } + })), +]; +``` + +## Cloudflare Workers + +```javascript {filename:functions/_middleware.js} +import * as Sentry from '@sentry/cloudflare'; + +export default withSentry( + env => ({ + dsn: "___PUBLIC_DSN___", + // To set a uniform sample rate + tracesSampleRate: 0.2 + + // Alternatively, to control sampling dynamically + tracesSampler: samplingContext => { ... } + }), + { + async fetch(request, env, ctx) { + return new Response('Hello World!'); + }, + } satisfies ExportedHandler, +); +``` diff --git a/platform-includes/performance/enable-automatic-instrumentation/javascript.bun.mdx b/platform-includes/performance/enable-automatic-instrumentation/javascript.bun.mdx index 15e6cf692f597..2731a1a13057b 100644 --- a/platform-includes/performance/enable-automatic-instrumentation/javascript.bun.mdx +++ b/platform-includes/performance/enable-automatic-instrumentation/javascript.bun.mdx @@ -1,17 +1 @@ -To enable tracing, include the `Tracing` integration in your SDK configuration options. - - - -```javascript -import * as Sentry from "@sentry/bun"; - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - - integrations: [], - - // We recommend adjusting this value in production, or using tracesSampler - // for finer control - tracesSampleRate: 1.0, -}); -``` +To enable tracing, set either a `tracesSampleRate` or a `tracesSampler` in your SDK configuration options, as described in Set Up Performance. diff --git a/platform-includes/performance/enable-automatic-instrumentation/javascript.cloudflare.mdx b/platform-includes/performance/enable-automatic-instrumentation/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..2731a1a13057b --- /dev/null +++ b/platform-includes/performance/enable-automatic-instrumentation/javascript.cloudflare.mdx @@ -0,0 +1 @@ +To enable tracing, set either a `tracesSampleRate` or a `tracesSampler` in your SDK configuration options, as described in Set Up Performance. diff --git a/platform-includes/performance/enable-tracing/javascript.cloudflare.mdx b/platform-includes/performance/enable-tracing/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..604458dce031a --- /dev/null +++ b/platform-includes/performance/enable-tracing/javascript.cloudflare.mdx @@ -0,0 +1 @@ +Tracing is enabled by default in the Sentry Cloudflare SDK. diff --git a/platform-includes/sourcemaps/primer/javascript.cloudflare.mdx b/platform-includes/sourcemaps/primer/javascript.cloudflare.mdx new file mode 100644 index 0000000000000..44d6d15d2b41e --- /dev/null +++ b/platform-includes/sourcemaps/primer/javascript.cloudflare.mdx @@ -0,0 +1,5 @@ +To enable readable stack traces in your Sentry errors, you need to upload your source maps to Sentry. + +![Readable Stack Traces](./readable-stacktraces.png) + +If you are using plain Cloudflare Workers, set `upload_source_maps = true` to your `wrangler.toml` file to enable source map generation. diff --git a/src/components/platformIcon.tsx b/src/components/platformIcon.tsx index 0540e83373904..acc76e83d355d 100644 --- a/src/components/platformIcon.tsx +++ b/src/components/platformIcon.tsx @@ -887,6 +887,7 @@ export const PLATFORM_TO_ICON = { 'javascript-capacitor': 'capacitor', 'javascript-connect': 'connect', 'javascript-cordova': 'cordova', + 'javascript-cloudflare': 'cloudflare', 'javascript-deno': 'deno', 'javascript-electron': 'electron', 'javascript-ember': 'ember',