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

Add uuid to mac crash report

parent 33906654
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <vector> #include <vector>
//Why? Because BOOL //Why? Because BOOL
void setCrashUserMetadataWrapper(const std::string& userid, const std::string& username);
void launchApplication(const std::string* app_name, const std::vector<std::string>* args); void launchApplication(const std::string* app_name, const std::vector<std::string>* args);
#endif // LL_LLAPPVIEWERMACOSX_OBJC_H #endif // LL_LLAPPVIEWERMACOSX_OBJC_H
...@@ -33,6 +33,20 @@ ...@@ -33,6 +33,20 @@
#include "llappviewermacosx-objc.h" #include "llappviewermacosx-objc.h"
#if defined(USE_SENTRY)
#import "Sentry.h"
#endif
void setCrashUserMetadataWrapper(const std::string& userid, const std::string& username)
{
#if defined(USE_SENTRY)
SentryUser *user = [[SentryUser alloc] init];
user.userId = @(userid.c_str());
user.username = @(username.c_str());
[SentrySDK setUser:user];
#endif
}
void launchApplication(const std::string* app_name, const std::vector<std::string>* args) void launchApplication(const std::string* app_name, const std::vector<std::string>* args)
{ {
@autoreleasepool @autoreleasepool
......
...@@ -227,6 +227,11 @@ bool LLAppViewerMacOSX::init() ...@@ -227,6 +227,11 @@ bool LLAppViewerMacOSX::init()
return success; return success;
} }
void LLAppViewerMacOSX::setCrashUserMetadata(const LLUUID& user_id, const std::string& avatar_name)
{
setCrashUserMetadataWrapper(user_id.asString(), avatar_name);
}
// MacOSX may add and addition command line arguement for the process serial number. // MacOSX may add and addition command line arguement for the process serial number.
// The option takes a form like '-psn_0_12345'. The following method should be able to recognize // The option takes a form like '-psn_0_12345'. The following method should be able to recognize
// and either ignore or return a pair of values for the option. // and either ignore or return a pair of values for the option.
......
...@@ -31,23 +31,25 @@ ...@@ -31,23 +31,25 @@
#include "llappviewer.h" #include "llappviewer.h"
#endif #endif
class LLAppViewerMacOSX : public LLAppViewer class LLAppViewerMacOSX final : public LLAppViewer
{ {
public: public:
LLAppViewerMacOSX(); LLAppViewerMacOSX();
virtual ~LLAppViewerMacOSX(); ~LLAppViewerMacOSX() override;
// //
// Main application logic // Main application logic
// //
virtual bool init(); // Override to do application initialization bool init(); // Override to do application initialization
void setCrashUserMetadata(const LLUUID& user_id, const std::string& avatar_name) override;
protected: protected:
virtual bool restoreErrorTrap(); bool restoreErrorTrap() override;
virtual void initCrashReporting(bool reportFreeze); void initCrashReporting(bool reportFreeze) override;
std::string generateSerialNumber(); std::string generateSerialNumber();
virtual bool initParseCommandLine(LLCommandLineParser& clp); bool initParseCommandLine(LLCommandLineParser& clp) override;
}; };
#endif // LL_LLAPPVIEWERMACOSX_H #endif // LL_LLAPPVIEWERMACOSX_H
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