bump to 2.3.1, fix sentry

Fix sentry url length print

remove quotes

github actions is cursed

add debug print

test action

Dont use curl on windows

I dont know why the windows build doesnt report to sentry, so ill try
this.

Change timeout to 20 minutes instead of 5

this is a hacky workaround anyways, so i really dont see why it should
only be 5. 5 is barely enough.

temporarily enable debug mode on sentry

CMake: Use breakpad on windows instead of crashpad

CMake: Sentry: use inproc backend

Since cmake refuses to set my variables, I will do it this way.

I am so tired of this github workflow garbage

Sentry: disable debug again, set
sentry_options_set_symbolize_stacktraces to true, fix memory leak

Sentry: hotfix: dont free options

somehow that causes it to crash, and i cannot be bothered to find out
why right now
This commit is contained in:
Lion Kortlepel
2021-08-31 12:45:48 +03:00
committed by Lion
parent a7b02c459e
commit 8250d5876f
9 changed files with 29 additions and 21 deletions

View File

@@ -4,13 +4,23 @@
#include <sentry.h>
#include <sstream>
TSentry::TSentry(const std::string& SentryUrl) {
if (SentryUrl.empty()) {
static size_t SentryUrlLen;
// 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) {
mValid = false;
} else {
mValid = true;
sentry_options_t* options = sentry_options_new();
sentry_options_set_dsn(options, SentryUrl.c_str());
sentry_options_set_dsn(options, SECRET_SENTRY_URL);
sentry_options_set_debug(options, false); // needs to always be false
sentry_options_set_symbolize_stacktraces(options, true);
auto ReleaseString = "BeamMP-Server@" + Application::ServerVersion();
sentry_options_set_release(options, ReleaseString.c_str());
sentry_options_set_max_breadcrumbs(options, 10);
@@ -27,6 +37,7 @@ TSentry::~TSentry() {
void TSentry::PrintWelcome() {
if (mValid) {
info("Sentry started");
debug("Sentry URL is length " + std::to_string(SentryUrlLen));
} else {
info("Sentry disabled in unofficial build");
}