Skip to content

Commit

Permalink
Remove PlatformSection component from Python docs (#8735)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanie-anderson committed Dec 15, 2023
1 parent 5b86a7a commit 4ebb78d
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 1,447 deletions.
60 changes: 2 additions & 58 deletions src/platforms/python/configuration/filtering/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Filtering
sidebar_order: 60
description: "Learn more about how to configure your SDK to filter events reported to Sentry."
sidebar_order: 60
---

When you add Sentry to your app, you get a lot of valuable information about errors and performance. And lots of information is good -- as long as it's the right information, at a reasonable volume.
Expand All @@ -18,12 +18,10 @@ Configure your SDK to filter error events by using the <PlatformIdentifier name=

All Sentry SDKs support the <PlatformIdentifier name="before-send" /> callback method. Because it's called immediately before the event is sent to the server, this is your last chance to decide not to send data or to edit it. <PlatformIdentifier name="before-send" /> receives the event object as a parameter, which you can use to either modify the event’s data or drop it completely by returning `null`, based on custom logic and the data available on the event.

<PlatformContent includePath="configuration/before-send" />
<PlatformContent includePath="configuration/before-send/" />

Note also that breadcrumbs can be filtered, as discussed in [our Breadcrumbs documentation](/product/error-monitoring/breadcrumbs/).

<PlatformSection notSupported={["apple", "dotnet", "elixir", "rust", "unreal", "kotlin-multiplatform"]}>

#### Event Hints

The <PlatformIdentifier name="before-send" /> callback is passed both the `event` and a second argument, `hint`, that holds one or more hints.
Expand All @@ -34,10 +32,6 @@ Typically a `hint` holds the original exception so that additional data can be e

When the SDK creates an event or breadcrumb for transmission, that transmission is typically created from some sort of source object. For instance, an error event is typically created from a log record or exception instance. For better customization, SDKs send these objects to certain callbacks (<PlatformIdentifier name="before-send" />, <PlatformIdentifier name="before-breadcrumb" /> or the event processor system in the SDK).

</PlatformSection>

<PlatformSection notSupported={["native", "apple", "dotnet", "unreal", "elixir", "kotlin-multiplatform"]}>

### Using Hints

Hints are available in two places:
Expand Down Expand Up @@ -71,36 +65,10 @@ In this example, the fingerprint is forced to a common value if an exception of

<PlatformContent includePath="configuration/breadcrumb-hints" />

</PlatformSection>

<PlatformSection supported={["javascript", "node", "go"]} >

### Using <PlatformIdentifier name="ignore-errors" />

You can use the <PlatformIdentifier name="ignore-errors" /> option to filter out errors that match a certain pattern. This option receives a list of strings and regular expressions to match against the error message. When using strings, partial matches will be filtered out, so if you need to filter by exact match, use regex patterns instead.

<PlatformContent includePath="configuration/ignore-errors" />
</PlatformSection>

<PlatformSection supported={["php"]} >

### Using <PlatformIdentifier name="ignore-exceptions" />

You can use the <PlatformIdentifier name="ignore-exceptions" /> option to filter out errors that match a type or subtype.

<PlatformContent includePath="configuration/ignore-exceptions" />
</PlatformSection>

<PlatformSection supported={["android", "javascript", "java", "python"]} notSupported={["kotlin-multiplatform"]}>

### Decluttering Sentry

<PlatformContent includePath="configuration/decluttering" />

</PlatformSection>

<PlatformSection supported={["node", "javascript", "python", "php", "dotnet", "java", "ruby", "go", "react-native", "android", "dart"]} notSupported={["javascript.cordova", "unreal", "kotlin-multiplatform"]}>

## Filtering Transaction Events

To prevent certain transactions from being reported to Sentry, use the <PlatformIdentifier name="traces-sampler" /> or <PlatformIdentifier name="before-send-transaction" /> configuration option, which allows you to provide a function to evaluate the current transaction and drop it if it's not one you want.
Expand All @@ -119,30 +87,6 @@ If the transaction currently being processed has a parent transaction (from an u

Learn more about <PlatformLink to="/configuration/sampling/">configuring the sample rate</PlatformLink>.

<PlatformSection supported={["node", "javascript", "php", "go", "python", "java", "ruby"]}>

### Using <PlatformIdentifier name="before-send-transaction" />

<PlatformContent includePath="configuration/before-send-transaction" />

</PlatformSection>

<PlatformSection supported={["javascript", "node", "go"]} >

### Using <PlatformIdentifier name="ignore-transactions" />

You can use the <PlatformIdentifier name="ignore-transactions" /> option to filter out transactions that match a certain pattern. This option receives a list of strings and regular expressions to match against the transaction name. When using strings, partial matches will be filtered out, so if you need to filter by exact match, use regex patterns instead.

<PlatformContent includePath="configuration/ignore-transactions" />
</PlatformSection>

<PlatformSection supported={["php"]} >

### Using <PlatformIdentifier name="ignore-transactions" />

You can use the <PlatformIdentifier name="ignore-transactions" /> option to filter out transactions that match a certain string.

<PlatformContent includePath="configuration/ignore-transactions" />
</PlatformSection>

</PlatformSection>
Loading

0 comments on commit 4ebb78d

Please sign in to comment.