Skip to content

Commit b33022a

Browse files
Logs(React-Native) Add getting started snippet (#14790)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR This change adds an interactive snippet on how to start Sentry React Native with Log support. ## 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.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] 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:* - [x] 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](https://github.com/orgs/getsentry/teams/docs) ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent 40f1fb4 commit b33022a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/platforms/react-native/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ If you're using Expo, [read our docs](/platforms/react-native/manual-setup/expo/
6060
'performance',
6161
'profiling',
6262
'session-replay',
63+
"logs",
6364
]}
6465
/>
6566

@@ -80,6 +81,11 @@ Sentry.init({
8081
// https://docs.sentry.io/platforms/react-native/configuration/options/#traces-sample-rate
8182
tracesSampleRate: 1.0,
8283
// ___PRODUCT_OPTION_END___ performance
84+
// ___PRODUCT_OPTION_START___ logs
85+
// Enable logs to be sent to Sentry
86+
// Learn more at https://docs.sentry.io/platforms/react-native/logs/
87+
enableLogs: true,
88+
// ___PRODUCT_OPTION_END___ logs
8389
// ___PRODUCT_OPTION_START___ profiling
8490
// profilesSampleRate is relative to tracesSampleRate.
8591
// Here, we'll capture profiles for 100% of transactions.

0 commit comments

Comments
 (0)