chore: fill sentry user.id with hostname.

This commit is contained in:
Romain Le Jeune
2023-02-15 16:11:04 +00:00
parent 7225fc31da
commit 21b3a4bca3
2 changed files with 4 additions and 1 deletions

View File

@ -51,6 +51,9 @@ void setSentryReportScope() {
sentry_set_tag("Version", PROJECT_REVISION);
sentry_set_tag("HostArch", QSysInfo::currentCpuArchitecture().toUtf8());
sentry_set_tag("server_name", getProtectedHostname());
sentry_value_t user = sentry_value_new_object();
sentry_value_set_by_key(user, "id", sentry_value_new_string(getProtectedHostname()));
sentry_set_user(user);
}
sentry_options_t* newSentryOptions(const char *sentryDNS, const char *cacheDir) {

View File

@ -61,7 +61,7 @@ func init() { //nolint:gochecknoinits
sentry.ConfigureScope(func(scope *sentry.Scope) {
scope.SetFingerprint([]string{"{{ default }}"})
scope.SetTag("UserID", "not-defined")
scope.SetUser(sentry.User{ID: getProtectedHostname()})
})
sentry.Logger = log.New(