Skip to content

Commit

Permalink
Use Concurrent.available_processor_count instead of `Concurrent.usa…
Browse files Browse the repository at this point in the history
…ble_processor_count` (#2358)
  • Loading branch information
heka1024 authored Aug 11, 2024
1 parent 3fb9b67 commit 8c1c259
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

### Features

- Use `Concurrent.available_processor_count` instead of `Concurrent.usable_processor_count` ([#2358](https://github.com/getsentry/sentry-ruby/pull/2358))

- Support for tracing Faraday requests ([#2345](https://github.com/getsentry/sentry-ruby/pull/2345))
- Closes [#1795](https://github.com/getsentry/sentry-ruby/issues/1795)
- Please note that the Faraday instrumentation has some limitations in case of async requests: https://github.com/lostisland/faraday/issues/1381
Expand Down
7 changes: 2 additions & 5 deletions sentry-ruby/lib/sentry/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -656,11 +656,8 @@ def run_post_initialization_callbacks
end

def processor_count
if Concurrent.respond_to?(:usable_processor_count)
Concurrent.usable_processor_count
else
Concurrent.processor_count
end
available_processor_count = Concurrent.available_processor_count if Concurrent.respond_to?(:available_processor_count)
available_processor_count || Concurrent.processor_count
end
end
end

0 comments on commit 8c1c259

Please sign in to comment.