diff --git a/.github/workflows/sentry_opentelemetry_test.yml b/.github/workflows/sentry_opentelemetry_test.yml index dc4d2b2b2..718273ef2 100644 --- a/.github/workflows/sentry_opentelemetry_test.yml +++ b/.github/workflows/sentry_opentelemetry_test.yml @@ -34,6 +34,7 @@ jobs: uses: ruby/setup-ruby@8ddb7b3348b3951590db24c346e94ebafdabc926 with: ruby-version: ${{ matrix.ruby_version }} + bundler: "2.3" - name: Run specs env: diff --git a/.github/workflows/sentry_rails_test.yml b/.github/workflows/sentry_rails_test.yml index e070c15ba..82ace18e7 100644 --- a/.github/workflows/sentry_rails_test.yml +++ b/.github/workflows/sentry_rails_test.yml @@ -73,7 +73,9 @@ jobs: with: ruby-version: ${{ matrix.ruby_version }} bundler: "2.3" - rubygems: ${{ matrix.rails_version == '7.1.0' && 'latest' || 'default' }} + # rails 7.1.0 requires latest rubygems + # but 3.5.0 dropped ruby 2.7 so we need to pin to something that works for all our shit + rubygems: ${{ matrix.rails_version == '7.1.0' && '3.4.22' || 'default' }} - name: Build with Rails ${{ matrix.rails_version }} env: diff --git a/CHANGELOG.md b/CHANGELOG.md index aec6d7d8b..859aecf7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 5.15.2 + +### Bug Fixes + +- Fix `sample_rate` applying to check-in events [#2203](https://github.com/getsentry/sentry-ruby/pull/2203) + - Fixes [#2202](https://github.com/getsentry/sentry-ruby/issues/2202) + ## 5.15.1 ### Features diff --git a/sentry-ruby/lib/sentry/client.rb b/sentry-ruby/lib/sentry/client.rb index d2e886395..8c6691202 100644 --- a/sentry-ruby/lib/sentry/client.rb +++ b/sentry-ruby/lib/sentry/client.rb @@ -48,7 +48,7 @@ def initialize(configuration) def capture_event(event, scope, hint = {}) return unless configuration.sending_allowed? - unless event.is_a?(TransactionEvent) || configuration.sample_allowed? + if event.is_a?(ErrorEvent) && !configuration.sample_allowed? transport.record_lost_event(:sample_rate, 'event') return end