mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 22:36:23 +00:00
Sentry: Properly store DSN
This commit is contained in:
@@ -1,22 +1,17 @@
|
||||
#include "TSentry.h"
|
||||
#include "Common.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <sentry.h>
|
||||
#include <sstream>
|
||||
|
||||
// compile-time length of a string/array
|
||||
template <size_t N>
|
||||
constexpr size_t ConstexprLength(char const (&)[N]) {
|
||||
return N - 1;
|
||||
}
|
||||
|
||||
TSentry::TSentry() {
|
||||
if constexpr (ConstexprLength(SECRET_SENTRY_URL) == 0) {
|
||||
if (std::strlen(S_DSN) == 0) {
|
||||
mValid = false;
|
||||
} else {
|
||||
mValid = true;
|
||||
sentry_options_t* options = sentry_options_new();
|
||||
sentry_options_set_dsn(options, SECRET_SENTRY_URL);
|
||||
sentry_options_set_dsn(options, S_DSN);
|
||||
sentry_options_set_debug(options, false); // needs to always be false
|
||||
sentry_options_set_symbolize_stacktraces(options, true);
|
||||
auto ReleaseString = "BeamMP-Server@" + Application::ServerVersion();
|
||||
|
||||
Reference in New Issue
Block a user