-
-
Notifications
You must be signed in to change notification settings - Fork 51
Read DSN
, Environment
and Release
options from environment variables
#1054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
- Read `DSN`, `Environment` and `Release` options from environment variables ([#1054](https://github.com/getsentry/sentry-unreal/pull/1054)) If none of the above apply, you can opt out of this check by adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSLGTM
{ | ||
FormattedReleaseName = FString::Printf(TEXT("%s@%s"), *FormattedReleaseName, *Version); | ||
UE_LOG(LogSentrySdk, Log, TEXT("DSN is not set in plugin settings - using SENTRY_DSN environment variable instead.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Since Engine config is still priority, we will need to adapt demo when we update the SDK version there.
return EnvVarEnvironment; | ||
} | ||
|
||
UE_LOG(LogSentrySdk, Log, TEXT("Using current build configuration as Sentry environment.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also want to add a log message when using the environment from engine config? At least verbose. Same for GetEffectiveRelease()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a verbose log message when the value from the plugin settings is used (for both release and environment).
*/ | ||
FString GetEffectiveEnvironment() const; | ||
|
||
FString GetEnvironmentFromBuildConfig() const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also add documentation for the two other functions we added here
This PR adds support for configuring the plugin’s DSN, Environment, and Release options via environment variables when they are not set explicitly (useful for CI workflows).
Related docs update:
Closes #1044