Skip to content

Commit a3a15c3

Browse files
rahulchhabriacursoragent
authored andcommitted
Fix Logs (Beta) button functionality (#14083)
The "Logs (Beta)" option on the React Router documentation page did not update the displayed code snippet. This was due to the absence of corresponding `OnboardingOption` blocks for logs configuration within `docs/platforms/javascript/guides/react-router/index.mdx`. To resolve this: * The `_experiments: { enableLogs: true }` configuration was added. * This configuration was inserted into the `Sentry.init` call within the client-side setup, specifically under the `entry.client.tsx` section. * The same configuration was also added to the `Sentry.init` call within the server-side setup, under the `instrument.server.mjs` section. These additions ensure that when "Logs (Beta)" is selected, the relevant code snippet for enabling logs is displayed in both client and server initialization examples, aligning with the expected behavior of the `OnboardingOptionButtons` component. Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent 1c4f334 commit a3a15c3

File tree

1 file changed

+10
-0
lines changed
  • docs/platforms/javascript/guides/react-router

1 file changed

+10
-0
lines changed

docs/platforms/javascript/guides/react-router/index.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ Initialize the Sentry React SDK in your `entry.client.tsx` file:
112112
+ }),
113113
+ // ___PRODUCT_OPTION_END___ user-feedback
114114
+ ],
115+
+ // ___PRODUCT_OPTION_START___ logs
116+
+
117+
+ // Enable logs to be sent to Sentry
118+
+ _experiments: { enableLogs: true },
119+
+ // ___PRODUCT_OPTION_END___ logs
115120
+ // ___PRODUCT_OPTION_START___ performance
116121
+
117122
+ tracesSampleRate: 1.0, // Capture 100% of the transactions
@@ -232,6 +237,11 @@ Sentry.init({
232237
// Adds request headers and IP for users, for more info visit:
233238
// https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#sendDefaultPii
234239
sendDefaultPii: true,
240+
// ___PRODUCT_OPTION_START___ logs
241+
242+
// Enable logs to be sent to Sentry
243+
_experiments: { enableLogs: true },
244+
// ___PRODUCT_OPTION_END___ logs
235245
// ___PRODUCT_OPTION_START___ profiling
236246

237247
integrations: [nodeProfilingIntegration()],

0 commit comments

Comments
 (0)