diff --git a/nconf/bugsnag.go b/nconf/bugsnag.go index a2a561f..cf97289 100644 --- a/nconf/bugsnag.go +++ b/nconf/bugsnag.go @@ -8,6 +8,7 @@ type BugSnagConfig struct { Environment string APIKey string `envconfig:"api_key" json:"api_key" yaml:"api_key"` ProjectPackage string `envconfig:"project_package" json:"project_package" yaml:"project_package"` + NodeName string `envconfig:"node_name" json:"node_name" yaml:"node_name"` // If left unset, bugsnag will default to the value returned by os.Hostname } func SetupBugSnag(config *BugSnagConfig, version string) error { @@ -24,6 +25,7 @@ func SetupBugSnag(config *BugSnagConfig, version string) error { bugsnag.Configure(bugsnag.Configuration{ APIKey: config.APIKey, ReleaseStage: config.Environment, + Hostname: config.NodeName, AppVersion: version, ProjectPackages: projectPackages, PanicHandler: func() {}, // this is to disable panic handling. The lib was forking and restarting the process (causing races)