diff options
| -rw-r--r-- | vcpkg.json | 3 | ||||
| -rw-r--r-- | zenserver/zenserver.cpp | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/vcpkg.json b/vcpkg.json index 793abeab0..982c74b0f 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -22,6 +22,7 @@ "name": "rocksdb", "features": [ "lz4", "zstd" ] }, - "sol2" + "sol2", + "sentry-native" ] } diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp index b26efc6ec..1d1711dfe 100644 --- a/zenserver/zenserver.cpp +++ b/zenserver/zenserver.cpp @@ -5,6 +5,7 @@ #include <zencore/httpserver.h> #include <zencore/iobuffer.h> #include <zencore/refcount.h> +#include <zencore/scopeguard.h> #include <zencore/string.h> #include <zencore/thread.h> #include <zencore/timer.h> @@ -40,6 +41,13 @@ #include "diag/crashreport.h" #include "diag/logging.h" +#define SENTRY_BUILD_STATIC 1 +#include <sentry.h> +#pragma comment(lib, "sentry.lib") +#pragma comment(lib, "dbghelp.lib") +#pragma comment(lib, "winhttp.lib") +#pragma comment(lib, "version.lib") + ////////////////////////////////////////////////////////////////////////// // Services // @@ -287,6 +295,12 @@ main(int argc, char* argv[]) { mi_version(); + sentry_options_t* SentryOptions = sentry_options_new(); + sentry_options_set_dsn(SentryOptions, "https://[email protected]/5919284"); + sentry_init(SentryOptions); + + auto _ = zen::MakeGuard([&] { sentry_close(); }); + ZenServerOptions GlobalOptions; ZenServiceConfig ServiceConfig; ParseGlobalCliOptions(argc, argv, GlobalOptions, ServiceConfig); |