mirror of
https://github.com/lubosz/overte.git
synced 2025-08-16 07:12:46 +02:00
annotate with fingerprint immidiately
This commit is contained in:
parent
d9d72774d8
commit
23e5dd0d2c
3 changed files with 21 additions and 12 deletions
|
@ -1445,8 +1445,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
// add firstRun flag from settings to launch event
|
// add firstRun flag from settings to launch event
|
||||||
Setting::Handle<bool> firstRun { Settings::firstRun, true };
|
Setting::Handle<bool> firstRun { Settings::firstRun, true };
|
||||||
|
|
||||||
QString machineFingerPrint = uuidStringWithoutCurlyBraces(FingerprintUtils::getMachineFingerprint());
|
|
||||||
|
|
||||||
auto& userActivityLogger = UserActivityLogger::getInstance();
|
auto& userActivityLogger = UserActivityLogger::getInstance();
|
||||||
if (userActivityLogger.isEnabled()) {
|
if (userActivityLogger.isEnabled()) {
|
||||||
// sessionRunTime will be reset soon by loadSettings. Grab it now to get previous session value.
|
// sessionRunTime will be reset soon by loadSettings. Grab it now to get previous session value.
|
||||||
|
@ -1498,13 +1496,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
properties["first_run"] = firstRun.get();
|
properties["first_run"] = firstRun.get();
|
||||||
|
|
||||||
// add the user's machine ID to the launch event
|
// add the user's machine ID to the launch event
|
||||||
|
QString machineFingerPrint = uuidStringWithoutCurlyBraces(FingerprintUtils::getMachineFingerprint());
|
||||||
properties["machine_fingerprint"] = machineFingerPrint;
|
properties["machine_fingerprint"] = machineFingerPrint;
|
||||||
|
|
||||||
userActivityLogger.logAction("launch", properties);
|
userActivityLogger.logAction("launch", properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
setCrashAnnotation("machine_fingerprint", machineFingerPrint.toStdString());
|
|
||||||
|
|
||||||
_entityEditSender.setMyAvatar(myAvatar.get());
|
_entityEditSender.setMyAvatar(myAvatar.get());
|
||||||
|
|
||||||
// The entity octree will have to know about MyAvatar for the parentJointName import
|
// The entity octree will have to know about MyAvatar for the parentJointName import
|
||||||
|
|
|
@ -23,8 +23,9 @@
|
||||||
#include <QtCore/QFileInfo>
|
#include <QtCore/QFileInfo>
|
||||||
#include <QtAndroidExtras/QAndroidJniObject>
|
#include <QtAndroidExtras/QAndroidJniObject>
|
||||||
|
|
||||||
#include <SettingHelpers.h>
|
|
||||||
#include <BuildInfo.h>
|
#include <BuildInfo.h>
|
||||||
|
#include <FingerprintUtils.h>
|
||||||
|
#include <SettingHelpers.h>
|
||||||
|
|
||||||
google_breakpad::ExceptionHandler* gBreakpadHandler;
|
google_breakpad::ExceptionHandler* gBreakpadHandler;
|
||||||
|
|
||||||
|
@ -60,6 +61,9 @@ bool startCrashHandler(std::string appPath) {
|
||||||
annotations["build_number"] = BuildInfo::BUILD_NUMBER;
|
annotations["build_number"] = BuildInfo::BUILD_NUMBER;
|
||||||
annotations["build_type"] = BuildInfo::BUILD_TYPE_STRING;
|
annotations["build_type"] = BuildInfo::BUILD_TYPE_STRING;
|
||||||
|
|
||||||
|
auto machineFingerPrint = uuidStringWithoutCurlyBraces(FingerprintUtils::getMachineFingerprint());
|
||||||
|
annotations["machine_fingerprint"] = machineFingerPrint.toStdString();
|
||||||
|
|
||||||
flushAnnotations();
|
flushAnnotations();
|
||||||
|
|
||||||
gBreakpadHandler = new google_breakpad::ExceptionHandler(
|
gBreakpadHandler = new google_breakpad::ExceptionHandler(
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
#include <BuildInfo.h>
|
#include <BuildInfo.h>
|
||||||
|
#include <FingerprintUtils.h>
|
||||||
|
#include <UUID.h>
|
||||||
|
|
||||||
using namespace crashpad;
|
using namespace crashpad;
|
||||||
|
|
||||||
|
@ -83,6 +85,10 @@ bool startCrashHandler(std::string appPath) {
|
||||||
annotations["build_number"] = BuildInfo::BUILD_NUMBER.toStdString();
|
annotations["build_number"] = BuildInfo::BUILD_NUMBER.toStdString();
|
||||||
annotations["build_type"] = BuildInfo::BUILD_TYPE_STRING.toStdString();
|
annotations["build_type"] = BuildInfo::BUILD_TYPE_STRING.toStdString();
|
||||||
|
|
||||||
|
auto machineFingerPrint = uuidStringWithoutCurlyBraces(FingerprintUtils::getMachineFingerprint());
|
||||||
|
annotations["machine_fingerprint"] = machineFingerPrint.toStdString();
|
||||||
|
|
||||||
|
|
||||||
arguments.push_back("--no-rate-limit");
|
arguments.push_back("--no-rate-limit");
|
||||||
|
|
||||||
// Setup Crashpad DB directory
|
// Setup Crashpad DB directory
|
||||||
|
@ -123,14 +129,16 @@ bool startCrashHandler(std::string appPath) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void setCrashAnnotation(std::string name, std::string value) {
|
void setCrashAnnotation(std::string name, std::string value) {
|
||||||
std::lock_guard<std::mutex> guard(annotationMutex);
|
if (client) {
|
||||||
if (!crashpadAnnotations) {
|
std::lock_guard<std::mutex> guard(annotationMutex);
|
||||||
crashpadAnnotations = new crashpad::SimpleStringDictionary(); // don't free this, let it leak
|
if (!crashpadAnnotations) {
|
||||||
crashpad::CrashpadInfo* crashpad_info = crashpad::CrashpadInfo::GetCrashpadInfo();
|
crashpadAnnotations = new crashpad::SimpleStringDictionary(); // don't free this, let it leak
|
||||||
crashpad_info->set_simple_annotations(crashpadAnnotations);
|
crashpad::CrashpadInfo* crashpad_info = crashpad::CrashpadInfo::GetCrashpadInfo();
|
||||||
|
crashpad_info->set_simple_annotations(crashpadAnnotations);
|
||||||
|
}
|
||||||
|
std::replace(value.begin(), value.end(), ',', ';');
|
||||||
|
crashpadAnnotations->SetKeyValue(name, value);
|
||||||
}
|
}
|
||||||
std::replace(value.begin(), value.end(), ',', ';');
|
|
||||||
crashpadAnnotations->SetKeyValue(name, value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue