Skip to content

Conversation

@st0012
Copy link
Contributor

@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
Contributor 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
Contributor 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
Contributor 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

4 participants