Environments
Learn how to configure your SDK to tell Sentry about your environments.
Environments tell you where an error occurred, whether that's in your production system, your staging server, or elsewhere. It help you better filter issues, releases, and user feedback in the Issue Details page of sentry.io, which you learn more about in our documentation that covers using environments.
Sentry automatically creates an environment when it receives an event with the environment
parameter set.
By default, the SDK reports Editor
when running inside the Unreal Engine Editor. For shipping builds it'll use Release
and in other configurations it'll use FApp::GetBuildConfiguration()
You can also set the default environment to Release
, Development
, or Debug
in your build configuration or override the environment value programatically.
FConfigureSettingsDelegate SettingsDelegate;
SettingsDelegate.BindDynamic(this, &USomeClass::HandleSettingsDelegate);
void USomeClass::HandleSettingsDelegate(USentrySettings* Settings)
{
Settings->Environment = FString(TEXT("MyEnvironment"));
}
...
USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem<USentrySubsystem>();
SentrySubsystem->InitializeWithSettings(SettingsDelegate);
Environments are case-sensitive. The environment name can't contain newlines, spaces or forward slashes, can't be the string "None", or exceed 64 characters. You can't delete environments, but you can hide them.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").