Skip to content

Commit 4d42eeb

Browse files
committed
fix test with vocab change and keep hackney options
1 parent b686c0a commit 4d42eeb

File tree

3 files changed

+34
-5
lines changed

3 files changed

+34
-5
lines changed

lib/sentry/config.ex

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,35 @@ defmodule Sentry.Config do
278278
connections to keep in the pool. Only applied if `:client` is set to
279279
`Sentry.FinchClient`.
280280
"""
281+
],
282+
hackney_opts: [
283+
type: :keyword_list,
284+
deprecated: "Use Finch instead as default client.",
285+
default: [pool: :sentry_pool],
286+
doc: """
287+
Options to be passed to `hackney`. Only
288+
applied if `:client` is set to `Sentry.HackneyClient`.
289+
"""
290+
],
291+
hackney_pool_timeout: [
292+
type: :timeout,
293+
deprecated: "Use Finch instead as default client.",
294+
default: 5000,
295+
doc: """
296+
The maximum time to wait for a
297+
connection to become available. Only applied if `:client` is set to
298+
`Sentry.HackneyClient`.
299+
"""
300+
],
301+
hackney_pool_max_connections: [
302+
type: :pos_integer,
303+
deprecated: "Use Finch instead as default client.",
304+
default: 50,
305+
doc: """
306+
The maximum number of
307+
connections to keep in the pool. Only applied if `:client` is set to
308+
`Sentry.HackneyClient`.
309+
"""
281310
]
282311
]
283312

lib/sentry/finch_client.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ defmodule Sentry.FinchClient do
1111
HTTP client, you'll have to implement your own `Sentry.HTTPClient`. See the
1212
documentation for `Sentry.HTTPClient` for more information.
1313
14-
Finch is built on top of NimblePool. If you need to set other pool configuration options,
15-
see "Pool Configuration Options" in the source code for details on the possible map values.
16-
[finch configuration options](https://github.com/sneako/finch/blob/main/lib/finch.ex)
14+
Finch is built on top of [NimblePool](https://github.com/dashbitco/nimble_pool). If you need to set other pool configuration options,
15+
see "Pool Configuration Options" in the Finch documentation for details on the possible map values.
16+
[finch configuration options](https://hexdocs.pm/finch/Finch.html#start_link/1-pool-configuration-options)
1717
"""
1818
@impl true
1919
def child_spec do

test/mix/sentry.send_test_event_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ defmodule Mix.Tasks.Sentry.SendTestEventTest do
1515
assert output =~ """
1616
Client configuration:
1717
current environment_name: "some_env"
18-
finch_opts: []
18+
Finch options: []
1919
"""
2020

2121
assert output =~ ~s(Event not sent because the :dsn option is not set)
@@ -49,7 +49,7 @@ defmodule Mix.Tasks.Sentry.SendTestEventTest do
4949
public_key: public
5050
secret_key: secret
5151
current environment_name: "test"
52-
finch_opts: []
52+
Finch options: []
5353
"""
5454

5555
assert output =~ "Sending test event..."

0 commit comments

Comments
 (0)