Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/platforms/python/configuration/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
title: Configuration
description: "Additional configuration options for the SDK."
sidebar_order: 5
title: Extended Configuration
sidebar_title: Extended Configuration
description: "Learn about additional configuration options for the Python SDK."
sidebar_order: 13
sidebar_section: configuration
---

<PageGrid />
3 changes: 2 additions & 1 deletion docs/platforms/python/crons/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
title: Set Up Crons
sidebar_title: Crons
description: "Sentry Crons allows you to monitor the uptime and performance of any scheduled, recurring job in your application."
sidebar_order: 5750
sidebar_order: 9
sidebar_section: features
---

Once implemented, it'll allow you to get alerts and metrics to help you solve errors, detect timeouts, and prevent disruptions to your service.
Expand Down
3 changes: 2 additions & 1 deletion docs/platforms/python/data-management/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Data Management
description: Manage your events by pre-filtering, scrubbing sensitive information, and forwarding them to other systems.
sidebar_order: 2500
sidebar_order: 15
sidebar_section: configuration
---

<PageGrid />
3 changes: 2 additions & 1 deletion docs/platforms/python/enriching-events/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Enriching Events
description: Enrich events with additional context to make debugging simpler.
sidebar_order: 2300
sidebar_order: 12
sidebar_section: configuration
---

<PageGrid />
1 change: 1 addition & 0 deletions docs/platforms/python/feature-flags/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Set Up Feature Flags
sidebar_title: Feature Flags
sidebar_order: 7000
sidebar_section: features
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.
---

Expand Down
18 changes: 6 additions & 12 deletions docs/platforms/python/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ categories:
- You need a Sentry [account](https://sentry.io/signup/) and [project](/product/projects/)
- Read one of our dedicated guides if you use any of the <PlatformLink to="/integrations/#web-frameworks">frameworks</PlatformLink> we support

## Features

<p className="mb-5">
Select which Sentry features you'd like to install in addition to Error
Monitoring to get the corresponding installation and configuration
instructions below.
</p>

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

## Install

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

## Configure

Choose the features you want to configure, and this guide will show you how:

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

Configuration should happen as **early as possible** in your application's lifecycle.

```python
Expand Down
14 changes: 9 additions & 5 deletions docs/platforms/python/integrations/django/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,19 @@ uv add "sentry-sdk[django]"

## Configure

To configure the Sentry SDK, initialize it in your `settings.py` file:

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/).

Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
Choose the features you want to configure, and this guide will show you how:

<OnboardingOptionButtons
options={[
'error-monitoring',
'performance',
'profiling',
'logs',
]}
/>

To configure the Sentry SDK, initialize it in your `settings.py` file:

```python {filename:settings.py}
import sentry_sdk

Expand All @@ -61,6 +60,11 @@ sentry_sdk.init(
# there is an active span.
profile_lifecycle="trace",
# ___PRODUCT_OPTION_END___ profiling
# ___PRODUCT_OPTION_START___ logs

# Enable logs to be sent to Sentry
enable_logs=True,
# ___PRODUCT_OPTION_END___ logs
)
```

Expand Down
11 changes: 11 additions & 0 deletions docs/platforms/python/integrations/fastapi/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ uv add "sentry-sdk[fastapi]"

## Configure

Choose the features you want to configure, and this guide will show you how:

<OnboardingOptionButtons
options={[
'error-monitoring',
'performance',
'profiling',
'logs',
]}
/>

If you have the `fastapi` package in your dependencies, the FastAPI integration will be enabled automatically when you initialize the Sentry SDK.

<PlatformContent includePath="getting-started-config" />
Expand Down
11 changes: 11 additions & 0 deletions docs/platforms/python/integrations/flask/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ uv add "sentry-sdk[flask]"

## Configure

Choose the features you want to configure, and this guide will show you how:

<OnboardingOptionButtons
options={[
'error-monitoring',
'performance',
'profiling',
'logs',
]}
/>

If you have the `flask` package in your dependencies, the Flask integration will be enabled automatically when you initialize the Sentry SDK.

<PlatformContent includePath="getting-started-config" />
Expand Down
3 changes: 2 additions & 1 deletion docs/platforms/python/integrations/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Integrations
description: "Sentry provides additional integrations designed to change configuration or add instrumentation to your application."
sidebar_order: 40
sidebar_order: 14
sidebar_section: configuration
---

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.
Expand Down
4 changes: 3 additions & 1 deletion docs/platforms/python/logs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
title: Set Up Logs
sidebar_title: Logs
description: "Structured logs allow you to send, view and query logs sent from your applications within Sentry."
sidebar_order: 5755
sidebar_order: 4
sidebar_section: features
new: true
---

With Sentry Structured Logs, you can send text-based log information from your applications to Sentry. Once in Sentry, these logs can be viewed alongside relevant errors, searched by text-string, or searched using their individual attributes.
Expand Down
4 changes: 3 additions & 1 deletion docs/platforms/python/metrics/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
title: Set Up Metrics
sidebar_title: Metrics
description: "Metrics allow you to send, view and query counters, gauges and measurements sent from your applications within Sentry."
sidebar_order: 5755
sidebar_order: 7
sidebar_section: features
beta: true
---

<Alert>
Expand Down
3 changes: 2 additions & 1 deletion docs/platforms/python/migration/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Migration Guide
description: "Migrate from an older version of our Python SDK."
sidebar_order: 8000
sidebar_order: 17
sidebar_section: configuration
---

Here's a list of guides on migrating to a newer version of the Python SDK.
Expand Down
3 changes: 2 additions & 1 deletion docs/platforms/python/profiling/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
title: Set Up Python Profiling
sidebar_title: Profiling
description: "Learn how to enable profiling in your app if it is not already set up."
sidebar_order: 5000
sidebar_order: 8
sidebar_section: features
---

<PlatformContent includePath="profiling/index/preface" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Sampling
description: "Learn how to configure the volume of error and transaction events sent to Sentry."
sidebar_order: 60
sidebar_section: configuration
sidebar_order: 11
---

Adding Sentry to your app gives you a great deal of very valuable information about errors and performance you wouldn't otherwise get. And lots of information is good -- as long as it's the right information, at a reasonable volume.
Expand Down
3 changes: 2 additions & 1 deletion docs/platforms/python/security-policy-reporting/index.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
title: Set Up Security Policy Reporting
sidebar_title: Security Policy Reporting
sidebar_order: 7500
sidebar_order: 16
description: "Learn how Sentry can help manage Content-Security-Policy violations and reports here."
sidebar_section: configuration
---

<Include name="platforms/security-policy-reporting/content.mdx" />
3 changes: 2 additions & 1 deletion docs/platforms/python/tracing/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
title: Set Up Tracing
sidebar_title: Tracing
description: "With Tracing, Sentry tracks your software performance, measuring metrics like throughput and latency, and displays the impact of errors across multiple systems."
sidebar_order: 4000
sidebar_order: 6
sidebar_section: features
---

## Prerequisites
Expand Down
3 changes: 2 additions & 1 deletion docs/platforms/python/troubleshooting.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Troubleshooting
description: "While we don't expect most users of our SDK to run into these issues, we document edge cases here."
sidebar_order: 9000
sidebar_order: 18
sidebar_section: configuration
---

## General
Expand Down
11 changes: 6 additions & 5 deletions docs/platforms/python/usage/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Usage
sidebar_order: 10
description: "Use the SDK to manually capture errors and other events."
title: Capturing Errors
description: "Learn how to use the SDK to manually capture errors and other events."
sidebar_order: 2
sidebar_section: features
---

Sentry's SDK hooks into your runtime environment and automatically reports errors, uncaught exceptions, and unhandled rejections as well as other types of errors depending on the platform.
Expand All @@ -13,11 +14,11 @@ Key terms:
- An _event_ is one instance of sending data to Sentry. Generally, this data is an error or exception.
- An _issue_ is a grouping of similar events.
- The reporting of an event is called _capturing_.
When an event is captured, its sent to Sentry.
When an event is captured, it's sent to Sentry.

</Alert>

Python exceptions are captured in Sentry. You can omit the argument to <PlatformIdentifier name="capture-exception" /> and Sentry will attempt to capture the current exception. It is also useful for manual reporting of exceptions or messages to Sentry.
The most common form of capturing is to capture errors. What can be captured as an error varies by platform. In general, if you have something that looks like an exception, it can be captured. For some SDKs, you can also omit the argument to <PlatformIdentifier name="capture-exception" /> and Sentry will attempt to capture the current exception. It is also useful for manual reporting of errors or messages to Sentry.

While capturing an event, you can also record the breadcrumbs that lead up to that event. Breadcrumbs are different from events: they will not create an event in Sentry, but will be buffered until the next event is sent. Learn more about breadcrumbs in our <PlatformLink to="/enriching-events/breadcrumbs/">Breadcrumbs documentation</PlatformLink>.

Expand Down
3 changes: 2 additions & 1 deletion docs/platforms/python/user-feedback/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
title: Set Up User Feedback
sidebar_title: User Feedback
description: "Learn more about collecting user feedback when an event occurs. Sentry pairs the feedback with the original event, giving you additional insight into issues."
sidebar_order: 6000
sidebar_order: 10
sidebar_section: features
---

When a user experiences an error, Sentry provides the ability to collect additional feedback. You can collect feedback according to the method supported by the SDK.
Expand Down
4 changes: 4 additions & 0 deletions redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,10 @@ const userDocsRedirects = [
source: '/platforms/python/guides/:guide/:path*',
destination: '/platforms/python/:path*',
},
{
source: '/platforms/python/configuration/sampling/',
destination: '/platforms/python/sampling/',
},
{
source: '/platforms/php/guides/laravel/other-versions/laravel8-10/usage/:path*',
destination: '/platforms/php/guides/laravel/usage/:path*',
Expand Down
Loading