Skip to content

Commit 1afeabe

Browse files
committed
feat(python): Standardize Python docs navigation structure
Standardizes Python SDK documentation navigation to match JavaScript structure: **Sidebar Sections** - Added 'Features' section with organized feature pages - Added 'Configuration' section (renamed to 'Extended Configuration') - Both sections now have proper headers and grouping **Features Section** (sidebar_section: features) Order: Capturing Errors → Logs → Tracing → Metrics → Profiling → Crons → User Feedback - Renamed 'Usage' to 'Capturing Errors' (matching JS) - Added 'new' tag to Logs - Added 'beta' tag to Metrics - Reordered all features for consistency **Configuration Section** (sidebar_section: configuration) Order: Sampling → Enriching Events → Extended Configuration → Integrations → Data Management → Security Policy Reporting → Migration → Troubleshooting - Moved sampling.mdx from configuration/ to root (matching JS) - Renamed Configuration index to 'Extended Configuration' - Applied sidebar_section to all configuration files - Applied sidebar_section to all related pages **File Changes** - 20 Python documentation files modified - 1 file moved (sampling.mdx) - 1 redirect added in redirects.js Follows the pattern established in feat/js-docs-apis-sampling-restructure branch.
1 parent 876a63f commit 1afeabe

File tree

21 files changed

+81
-38
lines changed

21 files changed

+81
-38
lines changed
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
title: Configuration
3-
description: "Additional configuration options for the SDK."
4-
sidebar_order: 5
2+
title: Extended Configuration
3+
sidebar_title: Extended Configuration
4+
description: "Learn about additional configuration options for the Python SDK."
5+
sidebar_order: 13
6+
sidebar_section: configuration
57
---
68

79
<PageGrid />

docs/platforms/python/crons/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
title: Set Up Crons
33
sidebar_title: Crons
44
description: "Sentry Crons allows you to monitor the uptime and performance of any scheduled, recurring job in your application."
5-
sidebar_order: 5750
5+
sidebar_order: 9
6+
sidebar_section: features
67
---
78

89
Once implemented, it'll allow you to get alerts and metrics to help you solve errors, detect timeouts, and prevent disruptions to your service.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
title: Data Management
33
description: Manage your events by pre-filtering, scrubbing sensitive information, and forwarding them to other systems.
4-
sidebar_order: 2500
4+
sidebar_order: 15
5+
sidebar_section: configuration
56
---
67

78
<PageGrid />
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
title: Enriching Events
33
description: Enrich events with additional context to make debugging simpler.
4-
sidebar_order: 2300
4+
sidebar_order: 12
5+
sidebar_section: configuration
56
---
67

78
<PageGrid />

docs/platforms/python/feature-flags/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Set Up Feature Flags
33
sidebar_title: Feature Flags
44
sidebar_order: 7000
5+
sidebar_section: features
56
description: With Feature Flags, Sentry tracks feature flag evaluations in your application, keeps an audit log of feature flag changes, and reports any suspicious updates that may have caused an error.
67
---
78

docs/platforms/python/index.mdx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,6 @@ categories:
1515
- You need a Sentry [account](https://sentry.io/signup/) and [project](/product/projects/)
1616
- Read one of our dedicated guides if you use any of the <PlatformLink to="/integrations/#web-frameworks">frameworks</PlatformLink> we support
1717

18-
## Features
19-
20-
<p className="mb-5">
21-
Select which Sentry features you'd like to install in addition to Error
22-
Monitoring to get the corresponding installation and configuration
23-
instructions below.
24-
</p>
25-
26-
<OnboardingOptionButtons
27-
options={["error-monitoring", "performance", "profiling", "logs"]}
28-
/>
29-
3018
## Install
3119

3220
Install the Sentry SDK using [`pip`](https://pip.pypa.io/en/stable/):
@@ -41,6 +29,12 @@ uv add "sentry-sdk"
4129

4230
## Configure
4331

32+
Choose the features you want to configure, and this guide will show you how:
33+
34+
<OnboardingOptionButtons
35+
options={["error-monitoring", "performance", "profiling", "logs"]}
36+
/>
37+
4438
Configuration should happen as **early as possible** in your application's lifecycle.
4539

4640
```python

docs/platforms/python/integrations/django/index.mdx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,19 @@ uv add "sentry-sdk[django]"
2626

2727
## Configure
2828

29-
To configure the Sentry SDK, initialize it in your `settings.py` file:
30-
31-
In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/).
32-
33-
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
29+
Choose the features you want to configure, and this guide will show you how:
3430

3531
<OnboardingOptionButtons
3632
options={[
3733
'error-monitoring',
3834
'performance',
3935
'profiling',
36+
'logs',
4037
]}
4138
/>
4239

40+
To configure the Sentry SDK, initialize it in your `settings.py` file:
41+
4342
```python {filename:settings.py}
4443
import sentry_sdk
4544

@@ -61,6 +60,11 @@ sentry_sdk.init(
6160
# there is an active span.
6261
profile_lifecycle="trace",
6362
# ___PRODUCT_OPTION_END___ profiling
63+
# ___PRODUCT_OPTION_START___ logs
64+
65+
# Enable logs to be sent to Sentry
66+
enable_logs=True,
67+
# ___PRODUCT_OPTION_END___ logs
6468
)
6569
```
6670

docs/platforms/python/integrations/fastapi/index.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ uv add "sentry-sdk[fastapi]"
1919

2020
## Configure
2121

22+
Choose the features you want to configure, and this guide will show you how:
23+
24+
<OnboardingOptionButtons
25+
options={[
26+
'error-monitoring',
27+
'performance',
28+
'profiling',
29+
'logs',
30+
]}
31+
/>
32+
2233
If you have the `fastapi` package in your dependencies, the FastAPI integration will be enabled automatically when you initialize the Sentry SDK.
2334

2435
<PlatformContent includePath="getting-started-config" />

docs/platforms/python/integrations/flask/index.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ uv add "sentry-sdk[flask]"
1818

1919
## Configure
2020

21+
Choose the features you want to configure, and this guide will show you how:
22+
23+
<OnboardingOptionButtons
24+
options={[
25+
'error-monitoring',
26+
'performance',
27+
'profiling',
28+
'logs',
29+
]}
30+
/>
31+
2132
If you have the `flask` package in your dependencies, the Flask integration will be enabled automatically when you initialize the Sentry SDK.
2233

2334
<PlatformContent includePath="getting-started-config" />

docs/platforms/python/integrations/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
title: Integrations
33
description: "Sentry provides additional integrations designed to change configuration or add instrumentation to your application."
4-
sidebar_order: 40
4+
sidebar_order: 14
5+
sidebar_section: configuration
56
---
67

78
The Sentry SDK uses integrations to hook into the functionality of popular libraries to automatically instrument your application and give you the best data out of the box.

0 commit comments

Comments
 (0)