-
-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch HTTP client from hackney to finch #758
base: master
Are you sure you want to change the base?
Conversation
savhappy
commented
Jul 29, 2024
•
edited
Loading
edited
- switch from Hackney to Finch
- alter tests to pass with Finch
- closes Switch from Hackney to Finch as the default HTTP client #724
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start!! Left a few comments to address 🙃
@@ -253,30 +253,30 @@ defmodule Sentry.Config do | |||
The maximum number of attempts to send an event to Sentry. | |||
""" | |||
], | |||
hackney_opts: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to keep hackney_opts
and deprecate them if we want this to not be a breaking change. NimbleOptions supports deprecating options, check out the docs for that.
This also applies to the options below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean we need to keep the option:
client: [
type: :atom,
type_doc: "`t:module/0`",
default: Sentry.HackneyClient,
doc: """
"""
]
and the module HackneyClient?? @whatyouhide
lib/sentry/finch_client.ex
Outdated
HTTP client, you'll have to implement your own `Sentry.HTTPClient`. See the | ||
documentation for `Sentry.HTTPClient` for more information. | ||
|
||
Finch is built on top of NimblePool. If you need to set other pool configuration options, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you link to nimble_pool's repo here?
lib/sentry/finch_client.ex
Outdated
see "Pool Configuration Options" in the source code for details on the possible map values. | ||
[finch configuration options](https://github.com/sneako/finch/blob/main/lib/finch.ex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't point people to source code, that can change (especially main
). Let's link to Finch for docs
@spec finch_opts() :: keyword() | ||
def finch_opts, do: fetch!(:finch_opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we use these?
Co-authored-by: Andrea Leopardi <[email protected]>
Co-authored-by: Andrea Leopardi <[email protected]>
Co-authored-by: Andrea Leopardi <[email protected]>
Co-authored-by: Andrea Leopardi <[email protected]>