Skip to content
Snippets Groups Projects
Commit f4d71f58 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Set crash user metadata on linux

parent e55f7290
No related branches found
No related tags found
No related merge requests found
......@@ -338,6 +338,19 @@ bool LLAppViewerLinux::sendURLToOtherInstance(const std::string& url)
}
#endif // LL_DBUS_ENABLED
void LLAppViewerLinux::setCrashUserMetadata(const LLUUID& user_id, const std::string& avatar_name)
{
#if defined(USE_SENTRY)
if (mSentryInitialized)
{
sentry_value_t user = sentry_value_new_object();
sentry_value_set_by_key(user, "id", sentry_value_new_string(user_id.asString().c_str()));
sentry_value_set_by_key(user, "username", sentry_value_new_string(avatar_name.c_str()));
sentry_set_user(user);
}
#endif
}
void LLAppViewerLinux::initCrashReporting(bool reportFreeze)
{
#if defined(USE_SENTRY)
......
......@@ -44,11 +44,11 @@ extern "C" {
class LLCommandLineParser;
class LLAppViewerLinux : public LLAppViewer
class LLAppViewerLinux final : public LLAppViewer
{
public:
LLAppViewerLinux();
virtual ~LLAppViewerLinux();
~LLAppViewerLinux() override;
//
// Main application logic
......@@ -57,17 +57,19 @@ class LLAppViewerLinux : public LLAppViewer
std::string generateSerialNumber();
bool setupSLURLHandler();
void setCrashUserMetadata(const LLUUID& user_id, const std::string& avatar_name) override;
protected:
virtual bool beingDebugged();
bool beingDebugged() override;
virtual bool restoreErrorTrap();
virtual void initCrashReporting(bool reportFreeze);
bool restoreErrorTrap() override;
void initCrashReporting(bool reportFreeze) override;
virtual void initLoggingAndGetLastDuration();
virtual bool initParseCommandLine(LLCommandLineParser& clp);
void initLoggingAndGetLastDuration() override;
bool initParseCommandLine(LLCommandLineParser& clp) override;
virtual bool initSLURLHandler();
virtual bool sendURLToOtherInstance(const std::string& url);
bool initSLURLHandler() override;
bool sendURLToOtherInstance(const std::string& url) override;
private:
bool mSentryInitialized;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment