Skip to content

Commit 6f49ed5

Browse files
authored
chore: Add Hostname to Bugsnag Configuration (#327)
* add CDN host name * add hostnamr * rename * address feedback
1 parent 4c8a5d9 commit 6f49ed5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nconf/bugsnag.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ type BugSnagConfig struct {
88
Environment string
99
APIKey string `envconfig:"api_key" json:"api_key" yaml:"api_key"`
1010
ProjectPackage string `envconfig:"project_package" json:"project_package" yaml:"project_package"`
11+
NodeName string `envconfig:"node_name" json:"node_name" yaml:"node_name"` // If left unset, bugsnag will default to the value returned by os.Hostname
1112
}
1213

1314
func SetupBugSnag(config *BugSnagConfig, version string) error {
@@ -24,6 +25,7 @@ func SetupBugSnag(config *BugSnagConfig, version string) error {
2425
bugsnag.Configure(bugsnag.Configuration{
2526
APIKey: config.APIKey,
2627
ReleaseStage: config.Environment,
28+
Hostname: config.NodeName,
2729
AppVersion: version,
2830
ProjectPackages: projectPackages,
2931
PanicHandler: func() {}, // this is to disable panic handling. The lib was forking and restarting the process (causing races)

0 commit comments

Comments
 (0)