From a0352b61bd9e429c03e0c318b038a4a61a1d8e1a Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Fri, 21 Feb 2025 13:08:13 +0100 Subject: [PATCH] updated hooks --- .../dotnet/common/configuration/options.mdx | 10 +++---- .../unity/configuration/options/index.mdx | 26 ++++++++++++++++--- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/docs/platforms/dotnet/common/configuration/options.mdx b/docs/platforms/dotnet/common/configuration/options.mdx index 37844015cc42a..5738f4bf4ef02 100644 --- a/docs/platforms/dotnet/common/configuration/options.mdx +++ b/docs/platforms/dotnet/common/configuration/options.mdx @@ -208,26 +208,26 @@ Once enabled, this feature automatically captures HTTP client errors, like bad r These options can be used to hook the SDK in various ways to customize the reporting of events. - + This function is called with an SDK-specific message or error event object, and can return a modified event object, or `null` to skip reporting the event. This can be used, for instance, for manual PII stripping before sending. -By the time is executed, all scope data has already been applied to the event. Further modification of the scope won't have any effect. +By the time is executed, all scope data has already been applied to the event. Further modification of the scope won't have any effect. - + This function is called with an SDK-specific breadcrumb object before the breadcrumb is added to the scope. When nothing is returned from the function, the breadcrumb is dropped. To pass the breadcrumb through, return the first argument, which contains the breadcrumb object. The callback typically gets a second argument (called a "hint") which contains the original object from which the breadcrumb was created to further customize what the breadcrumb should look like. - + This function is called with an SDK-specific transaction object, and can return a modified transaction object, or `null` to skip reporting the transaction. This can be used, for instance, for manual PII-stripping before sending. -By the time is executed, all scope data has already been applied to the event and further modification of the scope won't have any effect. +By the time is executed, all scope data has already been applied to the event and further modification of the scope won't have any effect. diff --git a/docs/platforms/unity/configuration/options/index.mdx b/docs/platforms/unity/configuration/options/index.mdx index 6353fde7ede60..80b3edf5fde7c 100644 --- a/docs/platforms/unity/configuration/options/index.mdx +++ b/docs/platforms/unity/configuration/options/index.mdx @@ -208,21 +208,41 @@ These options can be used to hook the SDK in various ways to customize the repor The callbacks you set as hooks will be called on the thread where the event happened. So you can only use thread-safe APIs and only use Unity-specific APIs after you've checked that you're on the UI thread. - + This function is called with an SDK-specific message or error event object, and can return a modified event object, or `null` to skip reporting the event. This can be used, for instance, for manual PII stripping before sending. -By the time is executed, all scope data has already been applied to the event. Further modification of the scope won't have any effect. +By the time is executed, all scope data has already been applied to the event. Further modification of the scope won't have any effect. - + This function is called with an SDK-specific breadcrumb object before the breadcrumb is added to the scope. When nothing is returned from the function, the breadcrumb is dropped. To pass the breadcrumb through, return the first argument, which contains the breadcrumb object. The callback typically gets a second argument (called a "hint") which contains the original object from which the breadcrumb was created to further customize what the breadcrumb should look like. + + +This function is called with an SDK-specific transaction object, and can return a modified transaction object, or `null` to skip reporting the transaction. This can be used, for instance, for manual PII-stripping before sending. + +By the time is executed, all scope data has already been applied to the event and further modification of the scope won't have any effect. + + + + + +A callback function that controls screenshot capture behavior. Return `false` to prevent a screenshot from being captured for a specific event. This allows for fine-grained control over when screenshots are included with error reports. + + + + + +A callback function that controls view hierarchy capture behavior. Return `false` to prevent the view hierarchy from being captured for a specific event. This allows for fine-grained control over when view hierarchies are included with error reports. + + + ## Transport Options Transports are used to send events to Sentry. Transports can be customized to some degree to better support highly specific deployments.