diff options
| author | Dan Engelbrecht <[email protected]> | 2024-08-22 16:24:37 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-08-22 16:24:37 +0200 |
| commit | 4e843f8ddcd36ad1510d514099a690053292cf7d (patch) | |
| tree | 047f39008173b58161eed00c033b9e34cc0a4387 /src/zenserver/sentryintegration.cpp | |
| parent | separate worker pools into burst/background to avoid background jobs blocking... (diff) | |
| download | zen-4e843f8ddcd36ad1510d514099a690053292cf7d.tar.xz zen-4e843f8ddcd36ad1510d514099a690053292cf7d.zip | |
Add zenserver session id to Sentry context (#133)
Diffstat (limited to 'src/zenserver/sentryintegration.cpp')
| -rw-r--r-- | src/zenserver/sentryintegration.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zenserver/sentryintegration.cpp b/src/zenserver/sentryintegration.cpp index 255030b2b..a0225fb0a 100644 --- a/src/zenserver/sentryintegration.cpp +++ b/src/zenserver/sentryintegration.cpp @@ -4,6 +4,8 @@ #include <zencore/config.h> #include <zencore/logging.h> +#include <zencore/session.h> +#include <zencore/uid.h> #include <stdarg.h> #include <stdio.h> @@ -273,6 +275,9 @@ SentryIntegration::Initialize(std::string SentryDatabasePath, sentry_value_set_by_key(SentryUserObject, "cmd", sentry_value_new_string(CommandLine.c_str())); sentry_set_user(SentryUserObject); + sentry_value_set_by_key(SentryUserObject, "session", sentry_value_new_string(std::string(GetSessionIdString()).c_str())); + sentry_set_user(SentryUserObject); + m_SentryLogger = spdlog::create<sentry::sentry_sink>("sentry"); logging::SetErrorLog("sentry"); |