mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-22 18:16:43 +00:00
feat(GODT-2278): properly override server_name for go.
This commit is contained in:
@ -43,6 +43,7 @@ func init() { //nolint:gochecknoinits
|
|||||||
Release: constants.Revision,
|
Release: constants.Revision,
|
||||||
BeforeSend: EnhanceSentryEvent,
|
BeforeSend: EnhanceSentryEvent,
|
||||||
Transport: sentrySyncTransport,
|
Transport: sentrySyncTransport,
|
||||||
|
ServerName: getProtectedHostname(),
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
logrus.WithError(err).Error("Failed to initialize sentry options")
|
logrus.WithError(err).Error("Failed to initialize sentry options")
|
||||||
}
|
}
|
||||||
@ -63,7 +64,6 @@ type Reporter struct {
|
|||||||
appVersion string
|
appVersion string
|
||||||
identifier Identifier
|
identifier Identifier
|
||||||
hostArch string
|
hostArch string
|
||||||
serverName string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Identifier interface {
|
type Identifier interface {
|
||||||
@ -85,7 +85,6 @@ func NewReporter(appName, appVersion string, identifier Identifier) *Reporter {
|
|||||||
appVersion: appVersion,
|
appVersion: appVersion,
|
||||||
identifier: identifier,
|
identifier: identifier,
|
||||||
hostArch: getHostArch(),
|
hostArch: getHostArch(),
|
||||||
serverName: getProtectedHostname(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,12 +136,11 @@ func (r *Reporter) scopedReport(context map[string]interface{}, doReport func())
|
|||||||
}
|
}
|
||||||
|
|
||||||
tags := map[string]string{
|
tags := map[string]string{
|
||||||
"OS": runtime.GOOS,
|
"OS": runtime.GOOS,
|
||||||
"Client": r.appName,
|
"Client": r.appName,
|
||||||
"Version": r.appVersion,
|
"Version": r.appVersion,
|
||||||
"UserAgent": r.identifier.GetUserAgent(),
|
"UserAgent": r.identifier.GetUserAgent(),
|
||||||
"HostArch": r.hostArch,
|
"HostArch": r.hostArch,
|
||||||
"server_name": r.serverName,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sentry.WithScope(func(scope *sentry.Scope) {
|
sentry.WithScope(func(scope *sentry.Scope) {
|
||||||
|
|||||||
Reference in New Issue
Block a user