5050#if !defined(CRASHPAD_SUBMISSIONS_RATELIMITED)
5151#define CRASHPAD_SUBMISSIONS_RATELIMITED true
5252#endif
53+ #if !defined(CRASHPAD_SUBMISSION_PRODUCT)
54+ #define CRASHPAD_SUBMISSION_PRODUCT " MacroQuest"
55+ #endif
56+ #if !defined(CRASHPAD_SUBMISSION_ENVIRONMENT)
57+ #define CRASHPAD_SUBMISSION_ENVIRONMENT " unknown"
58+ #endif
5359
5460namespace fs = std::filesystem;
5561
@@ -89,14 +95,15 @@ static LPTOP_LEVEL_EXCEPTION_FILTER lpCrashpadTopLevelExceptionFilter = nullptr;
8995// The original unhandled exception filter. We need to hold this so we can put it back if we unload.
9096static LPTOP_LEVEL_EXCEPTION_FILTER lpOrigTopLevelExceptionFilter = nullptr ;
9197
92- // Annotations that should be added to crash reports
93- static crashpad::StringAnnotation<32 > buildTypeAnnotation (" buildType" );
94- static crashpad::StringAnnotation<32 > buildTimestampAnnotation (" eqVersion" );
95- static crashpad::StringAnnotation<32 > buildVersionAnnotation (" mqVersion" );
96- static crashpad::StringAnnotation<36 > buildCrashIdAnnotation (" crashId" );
98+ // Annotations that should be added to crash reports.
99+ // normal minidump: buildTypeAnnotation("buildType"); Sentry.io: buildTypeAnnotation("sentry[tags][buildType]");
100+ static crashpad::StringAnnotation<32 > buildTypeAnnotation (" sentry[tags][buildType]" );
101+ static crashpad::StringAnnotation<32 > buildTimestampAnnotation (" sentry[tags][eqVersion]" );
102+ static crashpad::StringAnnotation<32 > buildVersionAnnotation (" sentry[tags][mqVersion]" );
103+ static crashpad::StringAnnotation<36 > buildCrashIdAnnotation (" sentry[tags][crashId]" );
97104
98- static crashpad::StringAnnotation<MAX_STRING> s_currentCommandAnnotation (" mq.command" );
99- static crashpad::StringAnnotation<MAX_STRING> s_currentMacroData (" mq.macro_data" );
105+ static crashpad::StringAnnotation<MAX_STRING> s_currentCommandAnnotation (" sentry[tags][ mq.command] " );
106+ static crashpad::StringAnnotation<MAX_STRING> s_currentMacroData (" sentry[tags][ mq.macro_data] " );
100107
101108static std::string s_sessionUuid;
102109
@@ -127,6 +134,24 @@ bool InitializeCrashpad()
127134 return true ;
128135
129136 std::map<std::string, std::string> annotations;
137+ annotations[" format" ] = " minidump" ;
138+ const std::string product = CRASHPAD_SUBMISSION_PRODUCT;
139+ if (!product.empty ())
140+ {
141+ annotations[" product" ] = product;
142+ }
143+ annotations[" version" ] = MQMAIN_VERSION;
144+ std::string release = MQMAIN_VERSION;
145+ if (!product.empty ())
146+ {
147+ release = product + " @" + release;
148+ }
149+ annotations[" sentry[release]" ] = release;
150+ const std::string environment = CRASHPAD_SUBMISSION_ENVIRONMENT;
151+ if (!environment.empty ())
152+ {
153+ annotations[" sentry[environment]" ] = environment;
154+ }
130155 std::vector<std::string> arguments;
131156
132157 // This is the directory you will use to store and queue crash data.
@@ -137,9 +162,7 @@ bool InitializeCrashpad()
137162 // crash handlers. This path may be relative.
138163 std::wstring handlerPath (utf8_to_wstring (mq::internal_paths::MQRoot + " \\ crashpad_handler.exe" ));
139164
140- // This should point to your server dump submission port (labeled as "http/writer"
141- // in the listener configuration pane. Preferably, the SSL enabled port should
142- // be used. If Backtrace is hosting your instance, the default port is 6098.
165+ // This should point to your server dump submission endpoint.
143166 std::string url (gCrashpadSubmissionURL );
144167
145168 if (!gEnableRateLimit )
@@ -526,7 +549,7 @@ void CrashHandler_SetLastMacroData(const char* macroData)
526549
527550// ----------------------------------------------------------------------------
528551
529- static crashpad::StringAnnotation<32 > s_synthesizedAnnotation (" synthesized" );
552+ static crashpad::StringAnnotation<32 > s_synthesizedAnnotation (" sentry[tags][ synthesized] " );
530553
531554void DoCrash (PlayerClient*, const char * szLine)
532555{
0 commit comments