@@ -302,11 +302,11 @@ defmodule Sentry.Config do
302302 client: [
303303 type: :atom ,
304304 type_doc: "`t:module/0`" ,
305- default: Sentry.HackneyClient ,
305+ default: Sentry.FinchClient ,
306306 doc: """
307307 A module that implements the `Sentry.HTTPClient`
308- behaviour. Defaults to `Sentry.HackneyClient `, which uses
309- [hackney ](https://github.com/benoitc/hackney ) as the HTTP client.
308+ behaviour. Defaults to `Sentry.FinchClient `, which uses
309+ [Finch ](https://github.com/sneako/finch ) as the HTTP client.
310310 """
311311 ] ,
312312 send_max_attempts: [
@@ -316,6 +316,16 @@ defmodule Sentry.Config do
316316 The maximum number of attempts to send an event to Sentry.
317317 """
318318 ] ,
319+ finch_opts: [
320+ type: :keyword_list ,
321+ default: [ size: 50 , conn_max_idle_time: 5000 ] ,
322+ doc: """
323+ Pool options to be passed to `Finch.start_link/1`. These options control
324+ the connection pool behavior. Only applied if `:client` is set to
325+ `Sentry.FinchClient`. See [Finch documentation](https://hexdocs.pm/finch/Finch.html#start_link/1)
326+ for available options.
327+ """
328+ ] ,
319329 hackney_opts: [
320330 type: :keyword_list ,
321331 default: [ pool: :sentry_pool ] ,
@@ -607,6 +617,9 @@ defmodule Sentry.Config do
607617 @ spec sample_rate ( ) :: float ( )
608618 def sample_rate , do: fetch! ( :sample_rate )
609619
620+ @ spec finch_opts ( ) :: keyword ( )
621+ def finch_opts , do: fetch! ( :finch_opts )
622+
610623 @ spec hackney_opts ( ) :: keyword ( )
611624 def hackney_opts , do: fetch! ( :hackney_opts )
612625
0 commit comments