sentry-elixir icon indicating copy to clipboard operation
sentry-elixir copied to clipboard

Switch HTTP Client from Hackney to Finch

Open savhappy opened this issue 7 months ago • 4 comments

Switch default HTTP client from Hackney to Finch

Changes

  • Changes the default HTTP client from Sentry.HackneyClient to Sentry.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:

  1. 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

savhappy avatar May 27 '25 06:05 savhappy

@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 avatar May 29 '25 17:05 savhappy

@savhappy updated to use Req (in another PR) would be great I think 🙃. We also have:

  1. Failing CI
  2. Can you run mix deps.unlock --unused just to make sure

whatyouhide avatar May 30 '25 06:05 whatyouhide

@savhappy what's the status on this? Ready for review or anything?

whatyouhide avatar Sep 15 '25 08:09 whatyouhide

@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?

savhappy avatar Oct 01 '25 19:10 savhappy