Skip to content

Commit 985cdfd

Browse files
authored
updated hooks (#12800)
1 parent 8beb43f commit 985cdfd

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

docs/platforms/dotnet/common/configuration/options.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,26 +208,26 @@ Once enabled, this feature automatically captures HTTP client errors, like bad r
208208

209209
These options can be used to hook the SDK in various ways to customize the reporting of events.
210210

211-
<ConfigKey name="before-send">
211+
<ConfigKey name="set-before-send">
212212

213213
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.
214214

215-
By the time <PlatformIdentifier name="before-send" /> is executed, all scope data has already been applied to the event. Further modification of the scope won't have any effect.
215+
By the time <PlatformIdentifier name="set-before-send" /> is executed, all scope data has already been applied to the event. Further modification of the scope won't have any effect.
216216

217217
</ConfigKey>
218218

219-
<ConfigKey name="before-breadcrumb">
219+
<ConfigKey name="set-before-breadcrumb">
220220

221221
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.
222222
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.
223223

224224
</ConfigKey>
225225

226-
<ConfigKey name="before-send-transaction">
226+
<ConfigKey name="set-before-send-transaction">
227227

228228
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.
229229

230-
By the time <PlatformIdentifier name="before-send-transaction" /> is executed, all scope data has already been applied to the event and further modification of the scope won't have any effect.
230+
By the time <PlatformIdentifier name="set-before-send-transaction" /> is executed, all scope data has already been applied to the event and further modification of the scope won't have any effect.
231231

232232
</ConfigKey>
233233

docs/platforms/unity/configuration/options/index.mdx

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,21 +208,41 @@ These options can be used to hook the SDK in various ways to customize the repor
208208
The callbacks you set as hooks will be called on the thread where the event happened. So you can only use
209209
thread-safe APIs and only use Unity-specific APIs after you've checked that you're on the UI thread.
210210

211-
<ConfigKey name="before-send">
211+
<ConfigKey name="set-before-send">
212212

213213
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.
214214

215-
By the time <PlatformIdentifier name="before-send" /> is executed, all scope data has already been applied to the event. Further modification of the scope won't have any effect.
215+
By the time <PlatformIdentifier name="set-before-send" /> is executed, all scope data has already been applied to the event. Further modification of the scope won't have any effect.
216216

217217
</ConfigKey>
218218

219-
<ConfigKey name="before-breadcrumb">
219+
<ConfigKey name="set-before-breadcrumb">
220220

221221
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.
222222
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.
223223

224224
</ConfigKey>
225225

226+
<ConfigKey name="set-before-send-transaction">
227+
228+
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.
229+
230+
By the time <PlatformIdentifier name="set-before-send-transaction" /> is executed, all scope data has already been applied to the event and further modification of the scope won't have any effect.
231+
232+
</ConfigKey>
233+
234+
<ConfigKey name="set-before-capture-screenshot">
235+
236+
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.
237+
238+
</ConfigKey>
239+
240+
<ConfigKey name="set-before-capture-viewhierarchy">
241+
242+
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.
243+
244+
</ConfigKey>
245+
226246
## Transport Options
227247

228248
Transports are used to send events to Sentry. Transports can be customized to some degree to better support highly specific deployments.

0 commit comments

Comments
 (0)