Skip to content

Commit

Permalink
Warn users about config.async's deprecation (#1803)
Browse files Browse the repository at this point in the history
* Warn users about config.async's deprecation

* Update sentry-ruby/lib/sentry/configuration.rb

Co-authored-by: Neel Shah <neel.shah@sentry.io>

* Update changelog

Co-authored-by: Neel Shah <neel.shah@sentry.io>
  • Loading branch information
st0012 and sl0thentr0py committed May 3, 2022
1 parent 7429e6c commit eb8c598
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Unreleased

### Miscellaneous

- Warn users about `config.async`'s deprecation [#1803](https://github.com/getsentry/sentry-ruby/pull/1803)

## 5.3.0

### Features
Expand Down
10 changes: 10 additions & 0 deletions sentry-ruby/lib/sentry/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,16 @@ def dsn=(value)
def async=(value)
check_callable!("async", value)

log_warn <<~MSG
sentry-ruby now sends events asynchronously by default with its background worker (supported since 4.1.0).
The `config.async` callback has become redundant while continuing to cause issues.
(The problems of `async` are detailed in https://github.com/getsentry/sentry-ruby/issues/1522)
Therefore, we encourage you to remove it and let the background worker take care of async job sending.
It's deprecation is planned in the next major release (6.0), which is scheduled around the 3rd quarter of 2022.
MSG

@async = value
end

Expand Down

0 comments on commit eb8c598

Please sign in to comment.