aboutsummaryrefslogtreecommitdiff
path: root/src/zencore
diff options
context:
space:
mode:
Diffstat (limited to 'src/zencore')
-rw-r--r--src/zencore/include/zencore/sentryintegration.h8
-rw-r--r--src/zencore/sentryintegration.cpp7
2 files changed, 12 insertions, 3 deletions
diff --git a/src/zencore/include/zencore/sentryintegration.h b/src/zencore/include/zencore/sentryintegration.h
index 40e22af4e..d14c1c275 100644
--- a/src/zencore/include/zencore/sentryintegration.h
+++ b/src/zencore/include/zencore/sentryintegration.h
@@ -31,8 +31,12 @@ public:
SentryIntegration();
~SentryIntegration();
- void Initialize(std::string SentryDatabasePath, std::string SentryAttachmentsPath, bool AllowPII, const std::string& CommandLine);
- void LogStartupInformation();
+ void Initialize(std::string SentryDatabasePath,
+ std::string SentryAttachmentsPath,
+ std::string SentryDsn,
+ bool AllowPII,
+ const std::string& CommandLine);
+ void LogStartupInformation();
static void ClearCaches();
private:
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())