Skip to content

Commit d53605a

Browse files
authored
Unreal Engine: Remove ConfigureScope function (#13872)
This PR updates the Unreal Engine SDK docs to reflect recent changes that were made in getsentry/sentry-unreal#928. Specifically, `ConfigureScope` function was removed so now users can modify scope either via dedicated methods of `SentrySubsystem` class (for global scope) or by using a corresponding callback parameter that is available for all `capture` methods to add data for one specific event (local scope).
1 parent d9c1147 commit d53605a

File tree

1 file changed

+3
-29
lines changed
  • docs/platforms/unreal/enriching-events/scopes

1 file changed

+3
-29
lines changed

docs/platforms/unreal/enriching-events/scopes/index.mdx

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,42 +30,16 @@ routes or controllers.
3030
As you start using an SDK, a scope and hub are automatically created for you out
3131
of the box. It's unlikely that you'll interact with the hub directly unless you're
3232
writing an integration or you want to create or destroy scopes. Scopes, on the
33-
other hand are more user facing. You can call <PlatformIdentifier name="configure-scope" /> at any point in
34-
time to modify data stored on the scope. This is useful for doing things like
35-
[modifying the context](../context/).
33+
other hand are more user facing. You can modify data stored on the scope at any point.
34+
This is useful for doing things like [modifying the context](../context/).
3635

3736
When you call a global function such as <PlatformIdentifier name="capture-event" /> internally Sentry
3837
discovers the current hub and asks it to capture an event. Internally the hub will
3938
then merge the event with the topmost scope's data.
4039

4140
## Configuring the Scope
4241

43-
The most useful operation when working with scopes is the <PlatformIdentifier name="configure-scope" /> function. It can be used to reconfigure the current scope.
44-
45-
You can, for instance, add custom tags or inform Sentry about the currently authenticated user.
46-
47-
```cpp
48-
FConfigureScopeDelegate ScopeDelegate;
49-
ScopeDelegate.BindDynamic(this, &USomeClass::HandleScopeDelegate);
50-
51-
void USomeClass::HandleScopeDelegate(USentryScope* Scope)
52-
{
53-
USentryUser* SentryUser = NewObject<USentryUser>();
54-
SentryUser->SetEmail("[email protected]");
55-
SentryUser->SetId(42);
56-
57-
Scope->SetUser(SentryUser);
58-
Scope->SetTagValue("my-tag", "my value");
59-
}
60-
61-
...
62-
63-
USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem<USentrySubsystem>();
64-
65-
SentrySubsystem->ConfigureScope(ScopeDelegate);
66-
```
67-
68-
Alternatively, all data can be configured on the global scope using dedicated methods of `SentrySubsystem` class.
42+
All data can be configured on the global scope using dedicated methods of `SentrySubsystem` class.
6943

7044
```cpp
7145
USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem<USentrySubsystem>();

0 commit comments

Comments
 (0)