-
-
Notifications
You must be signed in to change notification settings - Fork 520
Closed
Description
Describe the bug
As described here: https://forum.sentry.io/t/unable-to-record-event-with-remote-sentry-server-sentry-error-the-server-responded-with-status-429/13553
Seeing this error happening for every event AFAIK but the event is logged in and visible in the Sentry dashboard.
I saw other complain about this issue, for example - https://forum.sentry.io/t/sending-events-from-application-returns-error-but-events-are-saved-in-sentry/13115
The error:
Unable to record event with remote Sentry server (Sentry::Error - the server responded with status 429
body: {"detail":"event rejected due to rate limit"}):
/usr/local/bundle/ruby/2.6.0/gems/sentry-ruby-core-4.2.2/lib/sentry/transport/http_transport.rb:29:in `rescue in send_data'
/usr/local/bundle/ruby/2.6.0/gems/sentry-ruby-core-4.2.2/lib/sentry/transport/http_transport.rb:15:in `send_data'
/usr/local/bundle/ruby/2.6.0/gems/sentry-ruby-core-4.2.2/lib/sentry/transport.rb:31:in `send_event'
/usr/local/bundle/ruby/2.6.0/gems/sentry-ruby-core-4.2.2/lib/sentry/client.rb:95:in `send_event'
/usr/local/bundle/ruby/2.6.0/gems/sentry-ruby-core-4.2.2/lib/sentry/client.rb:47:in `block in capture_event'
/usr/local/bundle/ruby/2.6.0/gems/sentry-ruby-core-4.2.2/lib/sentry/background_worker.rb:33:in `block in perform'
/usr/local/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in `run_task'
/usr/local/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in `block (3 levels) in create_worker'
/usr/local/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `loop'
/usr/local/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `block (2 levels) in create_worker'
/usr/local/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `catch'
To Reproduce
I followed the instructions in the documentation here: https://docs.sentry.io/platforms/ruby/
Expected behavior
report event without errors
Actual behavior
the events are reported and logged but exceptions are thrown.
Environment
- Ruby Version: 2.6.6
- SDK Version:
- sentry-rails (4.2.2)
- sentry-ruby (4.2.2)
- sentry-ruby-core (4.2.2)
- Integration Versions (if any):
- Rails 5.2.3
Raven Config
This is not necessary but could be helpful.
Sentry.init do |config|
config.dsn = settings.fetch(:dsn)
config.breadcrumbs_logger = %i[active_support_logger]
config.enabled_environments = %w[production staging]
config.traces_sample_rate = 1.0
config.release = ENV.fetch('GIT_COMMIT', nil)
config.excluded_exceptions +=
%w[
ActionController::RoutingError
AbstractController::ActionNotFound
ActiveRecord::RecordNotFound
Errors::NotFoundError
]
config.send_default_pii = true if Rails.env.staging?
end