Switch HTTP Client from Hackney to Finch
Switch default HTTP client from Hackney to Finch
Changes
- Changes the default HTTP client from
Sentry.HackneyClienttoSentry.FinchClient - Adds new Finch-specific configuration options:
-
finch_pool_opts: For pool configuration (defaults to[size: 50, conn_max_idle_time: 5000]) -
finch_request_opts: For request configuration (defaults to[receive_timeout: 5000])
-
- Deprecates Hackney-specific options
- Updates tests to use Finch configuration
- Updates documentation to reflect Finch as the default client
#skip-changelog
Migration
Users who want to continue using Hackney can:
- Explicitly configure Sentry to use Hackney:
config :sentry,
client: Sentry.HackneyClient
Dependencies
- Adds Finch as an optional dependency
- Keeps Hackney as an optional dependency for backward compatibility
Testing
- Updated all tests to use Finch configuration
- Added tests for Finch-specific error handling
- Verified backward compatibility with Hackney
Documentation
- Updated README to show Finch as the default client
- Added migration guidance for users of Hackney
- Updated configuration documentation to reflect new options
- closes #724
@whatyouhide made all the feedback changes! One thing I forgot to mention is the http_client module is still using Finch as an example to add your own.. Should this be updated to hackney or req? Or good as is?
@savhappy updated to use Req (in another PR) would be great I think 🙃. We also have:
- Failing CI
- Can you run
mix deps.unlock --unusedjust to make sure
@savhappy what's the status on this? Ready for review or anything?
@savhappy what's the status on this? Ready for review or anything?
CI fails for an unknown reason on certain Elixir versions.. Merging is blocked until these are resolved. @whatyouhide can you see where the error is coming from?