Skip to content

Commit

Permalink
unreal: Improve environment doc (#12062)
Browse files Browse the repository at this point in the history
* unreal: Improve environment doc

* Update docs/platforms/unreal/configuration/environments.mdx
  • Loading branch information
bruno-garcia authored Dec 19, 2024
1 parent 649dcd9 commit 6db67a6
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions docs/platforms/unreal/configuration/environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ description: "Learn how to configure your SDK to tell Sentry about your environm
sidebar_order: 30
---

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](/product/sentry-basics/environments/).
Environments in Sentry let you know where an error occurred, (such as in production, staging server, or another location).
They make it easier to filter issues, releases, and user feedback on the Issue Details page, (which you can navigate to by clicking any issue on the [**Issues**](https://sentry.io/orgredirect/organizations/:orgslug/issues/) page). To learn more, read our docs about [using environments](/product/sentry-basics/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.
When running inside the Unreal Engine Editor, the SDK reports the environment as `Editor`. For shipping builds, it defaults to `Release`.
In other configurations it uses the `FApp::GetBuildConfiguration()`.
You can also set the default environment to `Release`, `Development`, or `Debug` in your build configuration, or override it programmatically.

```cpp
FConfigureSettingsDelegate SettingsDelegate;
Expand All @@ -29,4 +29,11 @@ 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](/product/sentry-basics/environments/#hidden-environments) them.
**Important things to note about environments:**
- Environment names are case-sensitive.
- Names cannot include new lines, spaces, or forward slashes.
- Certain strings, like "None", aren't allowed.
- The maximum length for an environment name is 64 characters.
- Environments can't be deleted, but can be [hidden](/product/sentry-basics/environments/#hidden-environments) if no longer needed.

0 comments on commit 6db67a6

Please sign in to comment.