Skip to content

Commit 60f32dc

Browse files
Add logs beta checkbox functionality (#14010)
"Logs Beta" checkbox functionality was integrated into SDK getting started configurations. * The `logs` option was added to `src/components/onboarding/index.tsx`, defining the new feature and its UI description. * `OnboardingOptionButtons` components were introduced to `platform-includes/getting-started-config/*.mdx` for Java, Go, PHP, Ruby, and JavaScript, enabling the "Logs Beta" checkbox for these platforms. * For Android and Flutter, existing `OnboardingOptionButtons` in `docs/platforms/android/index.mdx` and `docs/platforms/dart/guides/flutter/index.mdx` were updated to include the `logs` option. * These modifications ensure that selecting the "Logs Beta" checkbox conditionally displays the relevant logs setup code, which was already present within `___PRODUCT_OPTION_START___ logs` and `___PRODUCT_OPTION_END___ logs` markers in the respective `.mdx` files. * A new file, `platform-includes/logs/setup/go.mdx`, was also created for Go logs setup documentation. --------- Co-authored-by: Cursor Agent <[email protected]>
1 parent ee6bf77 commit 60f32dc

File tree

43 files changed

+453
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+453
-45
lines changed

docs/platforms/android/index.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ Select which Sentry features you'd like to install in addition to Error Monitori
3131
'error-monitoring',
3232
'performance',
3333
'profiling',
34-
'session-replay'
34+
'session-replay',
35+
'logs'
3536
]}
3637
/>
3738

@@ -128,6 +129,10 @@ Configuration is done via the application `AndroidManifest.xml`. Here's an examp
128129
<!-- Enable profiling on app start -->
129130
<meta-data android:name="io.sentry.traces.profiling.start-on-app-start" android:value="true" />
130131
<!-- ___PRODUCT_OPTION_END___ profiling -->
132+
<!-- ___PRODUCT_OPTION_START___ logs -->
133+
<!-- Enable logs to be sent to Sentry -->
134+
<meta-data android:name="io.sentry.logs.enabled" android:value="true" />
135+
<!-- ___PRODUCT_OPTION_END___ logs -->
131136
<!-- ___PRODUCT_OPTION_START___ session-replay -->
132137
<!-- Record session replays for 100% of errors and 10% of sessions -->
133138
<meta-data android:name="io.sentry.session-replay.on-error-sample-rate" android:value="1.0" />

docs/platforms/dart/guides/flutter/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
3232
'error-monitoring',
3333
'performance',
3434
'profiling',
35+
'logs',
3536
]}
3637
/>
3738

@@ -83,6 +84,11 @@ Future<void> main() async {
8384
// Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0
8485
options.profilesSampleRate = 1.0;
8586
// ___PRODUCT_OPTION_END___ profiling
87+
// ___PRODUCT_OPTION_START___ logs
88+
89+
// Enable logs to be sent to Sentry
90+
options.enableLogs = true;
91+
// ___PRODUCT_OPTION_END___ logs
8692
},
8793
appRunner: () => runApp(
8894
SentryWidget(

docs/platforms/dart/guides/flutter/manual-setup.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ If you can't (or prefer not to) run the [automatic setup](/platforms/dart/guides
1313
'error-monitoring',
1414
'performance',
1515
'profiling',
16+
'logs',
1617
]}
1718
/>
1819

@@ -49,6 +50,11 @@ Future<void> main() async {
4950
// Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0
5051
options.profilesSampleRate = 1.0;
5152
// ___PRODUCT_OPTION_END___ profiling
53+
// ___PRODUCT_OPTION_START___ logs
54+
55+
// Enable logs to be sent to Sentry
56+
options.enableLogs = true;
57+
// ___PRODUCT_OPTION_END___ logs
5258
},
5359
appRunner: () => runApp(
5460
SentryWidget(

docs/platforms/go/common/index.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ Check out the other SDKs we support in the left-hand dropdown.
1010

1111
* If you don't have an account and Sentry project established already, please head over to [Sentry](https://sentry.io/signup/), and then return to this page.
1212

13+
## Features
14+
15+
In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/).
16+
17+
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
18+
19+
<OnboardingOptionButtons
20+
options={[
21+
'error-monitoring',
22+
'performance',
23+
'logs',
24+
]}
25+
/>
26+
1327
## Install
1428

1529
<PlatformContent includePath="getting-started-install" />

docs/platforms/javascript/common/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
4747
<PlatformCategorySection notSupported={["server"]}>
4848
<PlatformSection notSupported={["javascript", "javascript.cordova"]}>
4949
<OnboardingOptionButtons
50-
options={["error-monitoring", "performance", "session-replay", "user-feedback"]}
50+
options={["error-monitoring", "performance", "session-replay", "user-feedback", "logs"]}
5151
/>
5252
</PlatformSection>
5353
</PlatformCategorySection>
@@ -63,7 +63,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
6363
<PlatformCategorySection notSupported={["browser"]}>
6464
<PlatformSection notSupported={["javascript.bun"]}>
6565
<OnboardingOptionButtons
66-
options={["error-monitoring", "performance", "profiling"]}
66+
options={["error-monitoring", "performance", "profiling", "logs"]}
6767
/>
6868
</PlatformSection>
6969

@@ -72,7 +72,7 @@ In addition to capturing errors, you can monitor interactions between multiple s
7272
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
7373

7474
<PlatformSection supported={["javascript.bun"]}>
75-
<OnboardingOptionButtons options={["error-monitoring", "performance"]} />
75+
<OnboardingOptionButtons options={["error-monitoring", "performance", "logs"]} />
7676
</PlatformSection>
7777
</PlatformCategorySection>
7878

docs/platforms/javascript/guides/angular/manual-setup.mdx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ You need:
2424
Choose the features you want to configure, and this guide will show you how:
2525

2626
<OnboardingOptionButtons
27-
options={["error-monitoring", "performance", "session-replay", "user-feedback"]}
27+
options={["error-monitoring", "performance", "session-replay", "user-feedback", "logs"]}
2828
/>
2929

3030
<PlatformContent includePath="getting-started-features-expandable" />
@@ -130,6 +130,11 @@ Sentry.init({
130130
replaysSessionSampleRate: 0.1,
131131
replaysOnErrorSampleRate: 1.0,
132132
// ___PRODUCT_OPTION_END___ session-replay
133+
// ___PRODUCT_OPTION_START___ logs
134+
135+
// Enable logs to be sent to Sentry
136+
_experiments: { enableLogs: true },
137+
// ___PRODUCT_OPTION_END___ logs
133138
});
134139

135140
bootstrapApplication(AppComponent, appConfig).catch((err) =>
@@ -190,6 +195,11 @@ Sentry.init({
190195
replaysSessionSampleRate: 0.1,
191196
replaysOnErrorSampleRate: 1.0,
192197
// ___PRODUCT_OPTION_END___ session-replay
198+
// ___PRODUCT_OPTION_START___ logs
199+
200+
// Enable logs to be sent to Sentry
201+
_experiments: { enableLogs: true },
202+
// ___PRODUCT_OPTION_END___ logs
193203
});
194204

195205
platformBrowserDynamic()

docs/platforms/javascript/guides/astro/index.mdx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Non-Node runtimes, like Vercel's Edge runtime or Cloudflare Pages, are currently
2626

2727
## Install
2828

29-
<OnboardingOptionButtons options={["error-monitoring", "performance", "profiling", "session-replay", "user-feedback"]} />
29+
<OnboardingOptionButtons options={["error-monitoring", "performance", "profiling", "session-replay", "user-feedback", "logs"]} />
3030

3131
Sentry captures data by using an SDK within your application's runtime.
3232

@@ -119,8 +119,13 @@ Sentry.init({
119119
}),
120120
// ___PRODUCT_OPTION_END___ user-feedback
121121
],
122-
// ___PRODUCT_OPTION_START___ performance
122+
// ___PRODUCT_OPTION_START___ logs
123+
124+
// Enable logs to be sent to Sentry
125+
_experiments: { enableLogs: true },
126+
// ___PRODUCT_OPTION_END___ logs
123127

128+
// ___PRODUCT_OPTION_START___ performance
124129
// Define how likely traces are sampled. Adjust this value in production,
125130
// or use tracesSampler for greater control.
126131
tracesSampleRate: 1.0,
@@ -159,8 +164,13 @@ Sentry.init({
159164
nodeProfilingIntegration(),
160165
],
161166
// ___PRODUCT_OPTION_END___ profiling
162-
// ___PRODUCT_OPTION_START___ performance
167+
// ___PRODUCT_OPTION_START___ logs
168+
169+
// Enable logs to be sent to Sentry
170+
_experiments: { enableLogs: true },
171+
// ___PRODUCT_OPTION_END___ logs
163172

173+
// ___PRODUCT_OPTION_START___ performance
164174
// Define how likely traces are sampled. Adjust this value in production,
165175
// or use tracesSampler for greater control.
166176
tracesSampleRate: 1.0,

docs/platforms/javascript/guides/azure-functions/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Select which Sentry features you'd like to install in addition to Error Monitori
1717

1818
## Install
1919

20-
<OnboardingOptionButtons options={["error-monitoring", "performance", "profiling"]} />
20+
<OnboardingOptionButtons options={["error-monitoring", "performance", "profiling", "logs"]} />
2121

22-
Sentry captures data by using an SDK within your applications runtime. This means that you have to add `@sentry/node` as a runtime dependency to your application:
22+
Sentry captures data by using an SDK within your application's runtime. This means that you have to add `@sentry/node` as a runtime dependency to your application:
2323

2424
<PlatformContent includePath="getting-started-install" />
2525

docs/platforms/javascript/guides/bun/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ In addition to capturing errors, you can monitor interactions between multiple s
1616

1717
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
1818

19-
<OnboardingOptionButtons options={["error-monitoring", "performance"]} />
19+
<OnboardingOptionButtons options={["error-monitoring", "performance", "logs"]} />
2020

21-
Sentry captures data by using an SDK within your applications runtime.
21+
Sentry captures data by using an SDK within your application's runtime.
2222

2323
```bash {tabTitle:Bun}
2424
bun add @sentry/bun

docs/platforms/javascript/guides/capacitor/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
1616

1717
## Install
1818

19-
<OnboardingOptionButtons options={["error-monitoring", "performance", "session-replay", "user-feedback"]} />
19+
<OnboardingOptionButtons options={["error-monitoring", "performance", "session-replay", "user-feedback", "logs"]} />
2020

2121
Sentry captures data by using an SDK within your application's runtime.
2222

0 commit comments

Comments
 (0)