Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

savhappy
Copy link
Collaborator

@savhappy savhappy commented Jul 29, 2024

Copy link
Collaborator

@whatyouhide whatyouhide left a 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 🙃

lib/mix/tasks/sentry.send_test_event.ex Outdated Show resolved Hide resolved
lib/sentry/config.ex Outdated Show resolved Hide resolved
@@ -253,30 +253,30 @@ defmodule Sentry.Config do
The maximum number of attempts to send an event to Sentry.
"""
],
hackney_opts: [
Copy link
Collaborator

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.

Copy link
Collaborator Author

@savhappy savhappy Jul 30, 2024

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 Show resolved Hide resolved
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,
Copy link
Collaborator

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?

Comment on lines 15 to 16
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)
Copy link
Collaborator

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

lib/sentry/finch_client.ex Outdated Show resolved Hide resolved
Comment on lines +515 to +516
@spec finch_opts() :: keyword()
def finch_opts, do: fetch!(:finch_opts)
Copy link
Collaborator

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?

savhappy and others added 5 commits July 30, 2024 05:12
Co-authored-by: Andrea Leopardi <an.leopardi@gmail.com>
Co-authored-by: Andrea Leopardi <an.leopardi@gmail.com>
Co-authored-by: Andrea Leopardi <an.leopardi@gmail.com>
Co-authored-by: Andrea Leopardi <an.leopardi@gmail.com>
@savhappy savhappy changed the title Sav/switch hackney to finch Switch HTTP client from hackney to finch Aug 6, 2024
@whatyouhide whatyouhide added this to the 11.0.0 milestone Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch from Hackney to Finch as the default HTTP client
2 participants