From 80383e4e22db7bf677c158316a21c88b56a3255a Mon Sep 17 00:00:00 2001 From: Ivan Tustanivskyi Date: Thu, 29 May 2025 10:54:55 +0300 Subject: [PATCH] Remove `configure-scope` function --- .../unreal/enriching-events/scopes/index.mdx | 32 ++----------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/docs/platforms/unreal/enriching-events/scopes/index.mdx b/docs/platforms/unreal/enriching-events/scopes/index.mdx index 89094619a47d3..20b5bb2b9c4a9 100644 --- a/docs/platforms/unreal/enriching-events/scopes/index.mdx +++ b/docs/platforms/unreal/enriching-events/scopes/index.mdx @@ -30,9 +30,8 @@ routes or controllers. As you start using an SDK, a scope and hub are automatically created for you out of the box. It's unlikely that you'll interact with the hub directly unless you're writing an integration or you want to create or destroy scopes. Scopes, on the -other hand are more user facing. You can call at any point in -time to modify data stored on the scope. This is useful for doing things like -[modifying the context](../context/). +other hand are more user facing. You can modify data stored on the scope at any point. +This is useful for doing things like [modifying the context](../context/). When you call a global function such as internally Sentry discovers the current hub and asks it to capture an event. Internally the hub will @@ -40,32 +39,7 @@ then merge the event with the topmost scope's data. ## Configuring the Scope -The most useful operation when working with scopes is the function. It can be used to reconfigure the current scope. - -You can, for instance, add custom tags or inform Sentry about the currently authenticated user. - -```cpp -FConfigureScopeDelegate ScopeDelegate; -ScopeDelegate.BindDynamic(this, &USomeClass::HandleScopeDelegate); - -void USomeClass::HandleScopeDelegate(USentryScope* Scope) -{ - USentryUser* SentryUser = NewObject(); - SentryUser->SetEmail("john.doe@example.com"); - SentryUser->SetId(42); - - Scope->SetUser(SentryUser); - Scope->SetTagValue("my-tag", "my value"); -} - -... - -USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem(); - -SentrySubsystem->ConfigureScope(ScopeDelegate); -``` - -Alternatively, all data can be configured on the global scope using dedicated methods of `SentrySubsystem` class. +All data can be configured on the global scope using dedicated methods of `SentrySubsystem` class. ```cpp USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem();