From 73c1b01abb0cd0daf92b5e522d9bb33a7c55bd4a Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Mon, 9 Jan 2023 17:26:40 +0100 Subject: [PATCH 1/2] Update filtering docs --- .../common/configuration/filtering.mdx | 22 ++++++++++++------- .../common/configuration/options.mdx | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/platforms/common/configuration/filtering.mdx b/src/platforms/common/configuration/filtering.mdx index eb1486215c761..d3650661f80f0 100644 --- a/src/platforms/common/configuration/filtering.mdx +++ b/src/platforms/common/configuration/filtering.mdx @@ -22,12 +22,6 @@ All Sentry SDKs support the callback m - - - - - - Note also that breadcrumbs can be filtered, as discussed in [our Breadcrumbs documentation](/product/error-monitoring/breadcrumbs/). @@ -91,9 +85,11 @@ In this example, the fingerprint is forced to a common value if an exception of -## Using Sampling to Filter Transaction Events +## Filtering Transaction Events + +To prevent certain transactions from being reported to Sentry, use the or configuration option, which allows you to provide a function to evaluate the current transaction and drop it if it's not one you want. -To prevent certain transactions from being reported to Sentry, use the configuration option, which allows you to provide a function to evaluate the current transaction and drop it if it's not one you want. (It also allows you to sample different transactions at different rates.) +### Using **Note:** The and config options are mutually exclusive. If you define a to filter out certain transactions, you must also handle the case of non-filtered transactions by returning the rate at which you'd like them sampled. @@ -101,6 +97,16 @@ In its simplest form, used just for filtering the transaction, it looks like thi +It also allows you to sample different transactions at different rates. + Learn more about configuring the sample rate. + + +### Using + + + + + diff --git a/src/platforms/common/configuration/options.mdx b/src/platforms/common/configuration/options.mdx index fd6048a8f5ee4..f73c334049000 100644 --- a/src/platforms/common/configuration/options.mdx +++ b/src/platforms/common/configuration/options.mdx @@ -566,7 +566,7 @@ This function is called with an SDK-specific message or error event object, and - + This function is called with an SDK-specific transaction event object, and can return a modified transaction event object, or `null` to skip reporting the event. One way this might be used is for manual PII stripping before sending. From ca4ccab0ea46c05efdec976e1f494eaf91533471 Mon Sep 17 00:00:00 2001 From: Michi Hoffmann Date: Tue, 10 Jan 2023 10:28:44 +0100 Subject: [PATCH 2/2] Update src/platforms/common/configuration/filtering.mdx Co-authored-by: Alexander Dinauer --- src/platforms/common/configuration/filtering.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/common/configuration/filtering.mdx b/src/platforms/common/configuration/filtering.mdx index d3650661f80f0..ed7e0cb1e91ce 100644 --- a/src/platforms/common/configuration/filtering.mdx +++ b/src/platforms/common/configuration/filtering.mdx @@ -103,7 +103,7 @@ Learn more about configuring the sam -### Using +### Using