feat(GODT-2639): Enhance sentry init log.

This commit is contained in:
Romain Le Jeune
2023-05-22 09:30:51 +00:00
parent 35f0e081a5
commit bb99695e68
4 changed files with 5 additions and 1 deletions

View File

@ -49,7 +49,7 @@ QString sentryAttachmentFilePath() {
//****************************************************************************************************************************************************
QByteArray getProtectedHostname() {
QByteArray hostname = QCryptographicHash::hash(QSysInfo::machineHostName().toUtf8(), QCryptographicHash::Sha256);
return hostname.toHex();
return hostname.toBase64();
}
//****************************************************************************************************************************************************

View File

@ -22,6 +22,7 @@
#include <sentry.h>
void initSentry();
QByteArray getProtectedHostname();
void setSentryReportScope();
sentry_options_t* newSentryOptions(const char * sentryDNS, const char * cacheDir);
sentry_uuid_t reportSentryEvent(sentry_level_t level, const char *message);

View File

@ -305,6 +305,8 @@ int main(int argc, char *argv[]) {
// When not in attached mode, log entries are forwarded to bridge, which output it on stdout/stderr. bridge-gui's process monitor intercept
// these outputs and output them on the command-line.
log.setLevel(cliOptions.logLevel);
log.info(QString("New Sentry reporter - id: %1.").arg(getProtectedHostname()));
QString bridgeexec;
if (!cliOptions.attach) {
if (isBridgeRunning()) {

View File

@ -96,6 +96,7 @@ func GetTimeZone() string {
// NewReporter creates new sentry reporter with appName and appVersion to report.
func NewReporter(appName string, identifier Identifier) *Reporter {
logrus.WithField("id", GetProtectedHostname()).Info("New sentry reporter")
return &Reporter{
appName: appName,
appVersion: constants.Revision,