diff options
| author | Dan Engelbrecht <[email protected]> | 2025-06-10 13:08:59 +0200 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2025-06-10 13:08:59 +0200 |
| commit | f696e52d150ae284e26de5bdd78d1b1edf914314 (patch) | |
| tree | 392920b1a1334d61900b871b851228cd7963a46c /src/zen/zen.cpp | |
| parent | add sentry configurations options for debug/environment (diff) | |
| download | archived-zen-f696e52d150ae284e26de5bdd78d1b1edf914314.tar.xz archived-zen-f696e52d150ae284e26de5bdd78d1b1edf914314.zip | |
revert 61b4a88f and cadaad63
Diffstat (limited to 'src/zen/zen.cpp')
| -rw-r--r-- | src/zen/zen.cpp | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/src/zen/zen.cpp b/src/zen/zen.cpp index d19ff840e..f0644a4f5 100644 --- a/src/zen/zen.cpp +++ b/src/zen/zen.cpp @@ -37,7 +37,6 @@ #include <zencore/trace.h> #include <zencore/windows.h> #include <zenhttp/httpcommon.h> -#include <zenutil/environmentoptions.h> #include <zenutil/logging.h> #include <zenutil/zenserverprocess.h> @@ -873,22 +872,18 @@ main(int argc, char** argv) #endif // ZEN_WITH_TRACE #if ZEN_USE_SENTRY - - SentryIntegration::Config SentryConfig; - - bool NoSentry = false; - + bool NoSentry = false; + bool SentryAllowPII = false; + std::string SentryDsn; Options .add_option("sentry", "", "no-sentry", "Disable Sentry crash handler", cxxopts::value<bool>(NoSentry)->default_value("false"), ""); Options.add_option("sentry", "", "sentry-allow-personal-info", "Allow personally identifiable information in sentry crash reports", - cxxopts::value<bool>(SentryConfig.AllowPII)->default_value("false"), + cxxopts::value<bool>(SentryAllowPII)->default_value("false"), ""); - Options.add_option("sentry", "", "sentry-dsn", "Sentry DSN to send events to", cxxopts::value<std::string>(SentryConfig.Dsn), ""); - Options.add_option("sentry", "", "sentry-environment", "Sentry environment", cxxopts::value<std::string>(SentryConfig.Environment), ""); - Options.add_options()("sentry-debug", "Enable debug mode for Sentry", cxxopts::value<bool>(SentryConfig.Debug)->default_value("false")); + Options.add_option("sentry", "", "sentry-dsn", "Sentry DSN to send events to", cxxopts::value<std::string>(SentryDsn), ""); #endif Options.parse_positional({"command"}); @@ -933,27 +928,6 @@ main(int argc, char** argv) } #if ZEN_USE_SENTRY - - { - EnvironmentOptions EnvOptions; - - EnvOptions.AddOption("UE_ZEN_SENTRY_DSN"sv, SentryConfig.Dsn, "sentry-dsn"sv); - EnvOptions.AddOption("UE_ZEN_SENTRY_ALLOWPERSONALINFO"sv, SentryConfig.AllowPII, "sentry-allow-personal-info"sv); - EnvOptions.AddOption("UE_ZEN_SENTRY_ENVIRONMENT"sv, SentryConfig.Environment, "sentry-environment"sv); - - bool EnvEnableSentry = !NoSentry; - EnvOptions.AddOption("UE_ZEN_SENTRY_ENABLED"sv, EnvEnableSentry, "no-sentry"sv); - - EnvOptions.AddOption("UE_ZEN_SENTRY_DEBUG"sv, SentryConfig.Debug, "sentry-debug"sv); - - EnvOptions.Parse(ParseResult); - - if (EnvEnableSentry != !NoSentry) - { - NoSentry = !EnvEnableSentry; - } - } - SentryIntegration Sentry; if (NoSentry == false) @@ -971,9 +945,7 @@ main(int argc, char** argv) SB.Append(argv[i]); } - SentryConfig.DatabasePath = SentryDatabasePath; - - Sentry.Initialize(SentryConfig, SB.ToString()); + Sentry.Initialize(SentryDatabasePath, {}, SentryDsn, SentryAllowPII, SB.ToString()); SentryIntegration::ClearCaches(); } |