Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error notifications are disabled (missing doc?) #724

Open
SaimonL opened this issue Oct 28, 2023 · 1 comment
Open

Error notifications are disabled (missing doc?) #724

SaimonL opened this issue Oct 28, 2023 · 1 comment

Comments

@SaimonL
Copy link

SaimonL commented Oct 28, 2023

Hi when there is an error in my application, I keep getting the error message "error notifications are disabled" regardless of what I do in config and in any environment. I get the same error when I do rake airbrake:test
Digging in to the code I came across "/lib/airbrake-ruby/config/validator.rb"

Line 47

unless config.error_notifications
  return promise.reject('error notifications are disabled')
end

Can you please explain how I can set error_notifications in my configuration.
If I delete that code from "/lib/airbrake-ruby/config/validator.rb" everything works fine.

Googling it I see no docs out there for it. Some suggested that I set config.consider_all_requests_local = false which does not work either. Going to this page absolutely did not help what so ever.

My Config

I have set the proper value in ENV variables AIRBRAKE_PROJECT_ID and AIRBRAKE_PROJECT_KEY

if (project_id = ENV['AIRBRAKE_PROJECT_ID']) &&
   project_key = (ENV['AIRBRAKE_PROJECT_KEY'] || ENV['AIRBRAKE_API_KEY'])
  Airbrake.configure do |c|
    c.project_id = project_id
    c.project_key = project_key

    c.root_directory = Rails.root
    c.logger = Airbrake::Rails.logger
    c.environment = Rails.env
    c.ignore_environments = %w[test]
    c.blocklist_keys = [/password/i, /authorization/i]
  end
else
  Rails.logger.warn(
    "#{__FILE__}: Airbrake project id or project key is not set. " \
    "Skipping Airbrake configuration"
  )
end

I even tried setting c.error_notifications = true but no luck

@SaimonL SaimonL changed the title Error notifications are disabled Error notifications are disabled (missing doc?) Oct 28, 2023
@nicolabba
Copy link

I know this is an old issue but you could try adding c.remote_config = false in your configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants