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

Goodbye faraday 👋 #1678

Merged
merged 4 commits into from
Jan 20, 2022
Merged

Goodbye faraday 👋 #1678

merged 4 commits into from
Jan 20, 2022

Conversation

st0012
Copy link
Collaborator

@st0012 st0012 commented Jan 7, 2022

  1. Removed faraday_builder and http_adapter transport configs.
  2. Rewrote HTTPTransport with pure Net::HTTP implementation. (faraday-net_http provided pretty good guidance)
  3. Removed faraday from dependencies.

Todo

  • Test against different versions of Net::HTTP to see if the implementation can work from Ruby 2.4~3.1
  • Update migration guide and documentation.

Closes #1663

@st0012 st0012 added this to the 5.0.0 milestone Jan 7, 2022
@st0012 st0012 self-assigned this Jan 7, 2022
@st0012 st0012 added the wip label Jan 7, 2022
@st0012
Copy link
Collaborator Author

st0012 commented Jan 7, 2022

@sl0thentr0py It seems to work 🎉

@ojab
Copy link
Contributor

ojab commented Jan 12, 2022

btw, are other transports welcome? We're using httpx for API clients, because it has nice API and HTTP/2 + persistent connections support. It wouldn't hurt to use it for interactions with sentry, curling DSN says that it's HTTP/2. The same question about adding breadcrumbs for it.

Sorry for offtopic, dunno where to ask.

@st0012
Copy link
Collaborator Author

st0012 commented Jan 12, 2022

@ojab You can always use config.transport.transport_class to assign your custom transports. But I don't plan to introduce other built-in transports, especially not the ones that relies on 3rd-party libraries (so we don't need to go through a similar issue as #1663 a few years later).
With that being said, I'd be happy to help if you want to introduce something like sentry-httpx to support both the transport and breadcrumb support 😄

@ojab
Copy link
Contributor

ojab commented Jan 12, 2022

You mean as sentry-rails works currently, still in the same repo, just as a different gem?

@st0012
Copy link
Collaborator Author

st0012 commented Jan 12, 2022

Oh no I mean you can write your own sentry-httpx gem (or whatever you want to call it). I can give you pointers on how to write breadcrumb loggers and transports if you need any.

@st0012 st0012 changed the title Drop faraday Goodbye faraday 👋 Jan 14, 2022
@trevorturk
Copy link

Excellent work on the changelog entry, thank you!

@st0012 st0012 force-pushed the drop-faraday branch 4 times, most recently from 5c18177 to 7eee008 Compare January 15, 2022 16:29
@st0012 st0012 merged commit dab6b6d into master Jan 20, 2022
@st0012 st0012 deleted the drop-faraday branch January 20, 2022 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Faraday 2.0 requires locking to ~> 1.0 or switching to faraday-net_http
3 participants