aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/sentryintegration.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-06-09 12:22:27 +0200
committerGitHub Enterprise <[email protected]>2025-06-09 12:22:27 +0200
commitfeb888db2d557066ebe9eb3bb1d7e3b052ae1221 (patch)
tree38002b17f35699ba61ac3d08994c3f2fa5aec8b7 /src/zencore/sentryintegration.cpp
parentuse unique tmp name for auth token file (#426) (diff)
downloadzen-feb888db2d557066ebe9eb3bb1d7e3b052ae1221.tar.xz
zen-feb888db2d557066ebe9eb3bb1d7e3b052ae1221.zip
`--sentry-dsn` option for zen command line and zenserver to control Sentry reporting endpoint (#427)
moved sentry database path to temporary directory for zen commandline
Diffstat (limited to 'src/zencore/sentryintegration.cpp')
-rw-r--r--src/zencore/sentryintegration.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/zencore/sentryintegration.cpp b/src/zencore/sentryintegration.cpp
index d08fb7f1d..520d5162e 100644
--- a/src/zencore/sentryintegration.cpp
+++ b/src/zencore/sentryintegration.cpp
@@ -31,6 +31,10 @@ ZEN_THIRD_PARTY_INCLUDES_END
namespace sentry {
+namespace {
+ static const std::string DefaultDsn("https://[email protected]/5919284");
+}
+
struct SentryAssertImpl : zen::AssertImpl
{
virtual void ZEN_FORCENOINLINE ZEN_DEBUG_SECTION
@@ -194,6 +198,7 @@ SentryIntegration::~SentryIntegration()
void
SentryIntegration::Initialize(std::string SentryDatabasePath,
std::string SentryAttachmentsPath,
+ std::string SentryDsn,
bool AllowPII,
const std::string& CommandLine)
{
@@ -204,7 +209,7 @@ SentryIntegration::Initialize(std::string SentryDatabasePath,
SentryDatabasePath = SentryDatabasePath.substr(4);
}
sentry_options_t* SentryOptions = sentry_options_new();
- sentry_options_set_dsn(SentryOptions, "https://[email protected]/5919284");
+ sentry_options_set_dsn(SentryOptions, SentryDsn.empty() ? sentry::DefaultDsn.c_str() : SentryDsn.c_str());
sentry_options_set_database_path(SentryOptions, SentryDatabasePath.c_str());
sentry_options_set_logger(SentryOptions, SentryLogFunction, this);
if (!SentryAttachmentsPath.empty())