Skip to content

SignalException: SIGTERM not caught by sentry-raven #917

@islamhamdi

Description

@islamhamdi

Hi,

We have the following setup for sentry in sinatra app:

// Gemfile
gem 'sentry-raven'

// config/initializers.rb

# Sentry Raven Configs
require 'raven'

Raven.configure do |config|
  config.dsn =  // dsn configured
  config.timeout = 10
  config.open_timeout = 10

  # current env from ENV['RAILS_ENV'], if not present then uses ENV['RACK_ENV']
  config.environments = %w[staging]

  config.transport_failure_callback = lambda { |event|
    puts (event.to_s);
  }
end

use Raven::Rack

The following SignalException is not caught by Sentry:

 // raise SignalException, "SIGTERM"
 [GEM_ROOT]/gems/puma-3.12.0/lib/puma/cluster.rb:394 :in `block in setup_signals`
 [GEM_ROOT]/gems/puma-3.12.0/lib/puma/cluster.rb:488 :in `select`
 [GEM_ROOT]/gems/puma-3.12.0/lib/puma/cluster.rb:488 :in `run`
 [GEM_ROOT]/gems/puma-3.12.0/lib/puma/launcher.rb:184 :in `run`
 [GEM_ROOT]/gems/puma-3.12.0/lib/puma/cli.rb:78 :in `run`
 [GEM_ROOT]/gems/puma-3.12.0/bin/puma:10 :in `<top (required)>`

Is the reason that puma was required before sentry-raven gets initialized? if so what's the workaround?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions