From 6f49ed5ee35b0964bb845fa9c895f05ab0d6b0a9 Mon Sep 17 00:00:00 2001 From: Aarthy Chandrasekhar Date: Tue, 8 Mar 2022 14:35:20 -0500 Subject: [PATCH] chore: Add Hostname to Bugsnag Configuration (#327) * add CDN host name * add hostnamr * rename * address feedback --- nconf/bugsnag.go | 2 ++ 1 file changed, 2 insertions(+) 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)