code: func configureBugsnag(config *configuration.Configuration) {
  	if config.Reporting.Bugsnag.APIKey == "" {
  		return
  	}
  
  	bugsnagConfig := bugsnag.Configuration{
  		APIKey: config.Reporting.Bugsnag.APIKey,
  	}
  	if config.Reporting.Bugsnag.ReleaseStage != "" {
  		bugsnagConfig.ReleaseStage = config.Reporting.Bugsnag.ReleaseStage
  	}
  	if config.Reporting.Bugsnag.Endpoint != "" {
  		bugsnagConfig.Endpoint = config.Reporting.Bugsnag.Endpoint
  	}
  	bugsnag.Configure(bugsnagConfig)
  
  	// configure logrus bugsnag hook
  	hook, err := logrus_bugsnag.NewBugsnagHook()
  	if err != nil {
  		log.Fatalln(err)
  	}
  
  	log.AddHook(hook)
  }
docs: // configureBugsnag configures bugsnag reporting, if enabled