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) ...@@ -338,6 +338,19 @@ bool LLAppViewerLinux::sendURLToOtherInstance(const std::string& url)
} }
#endif // LL_DBUS_ENABLED #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) void LLAppViewerLinux::initCrashReporting(bool reportFreeze)
{ {
#if defined(USE_SENTRY) #if defined(USE_SENTRY)
......
...@@ -44,11 +44,11 @@ extern "C" { ...@@ -44,11 +44,11 @@ extern "C" {
class LLCommandLineParser; class LLCommandLineParser;
class LLAppViewerLinux : public LLAppViewer class LLAppViewerLinux final : public LLAppViewer
{ {
public: public:
LLAppViewerLinux(); LLAppViewerLinux();
virtual ~LLAppViewerLinux(); ~LLAppViewerLinux() override;
// //
// Main application logic // Main application logic
...@@ -57,17 +57,19 @@ class LLAppViewerLinux : public LLAppViewer ...@@ -57,17 +57,19 @@ class LLAppViewerLinux : public LLAppViewer
std::string generateSerialNumber(); std::string generateSerialNumber();
bool setupSLURLHandler(); bool setupSLURLHandler();
void setCrashUserMetadata(const LLUUID& user_id, const std::string& avatar_name) override;
protected: protected:
virtual bool beingDebugged(); bool beingDebugged() override;
virtual bool restoreErrorTrap(); bool restoreErrorTrap() override;
virtual void initCrashReporting(bool reportFreeze); void initCrashReporting(bool reportFreeze) override;
virtual void initLoggingAndGetLastDuration(); void initLoggingAndGetLastDuration() override;
virtual bool initParseCommandLine(LLCommandLineParser& clp); bool initParseCommandLine(LLCommandLineParser& clp) override;
virtual bool initSLURLHandler(); bool initSLURLHandler() override;
virtual bool sendURLToOtherInstance(const std::string& url); bool sendURLToOtherInstance(const std::string& url) override;
private: private:
bool mSentryInitialized; 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