getsentry / sentry-php

The official PHP SDK for Sentry (sentry.io)
https://sentry.io
MIT License
1.83k stars 452 forks source link

Pluggable transports #219

Closed adamlc closed 7 years ago

adamlc commented 9 years ago

What are people's thoughts on having pluggable transports? At the moment everything is within Raven_Client and its a little messy.

I propose splitting out each curl_method into their own classes which will also allow people to write their own transports implementing a transport interface (which I think are compatible with 5.2, assuming you need to keep compatibility that far back?).

My use case is I need to write a non blocking transport that I can use in ReactPHP and at the moment there isn't an easy way of doing this.

dcramer commented 9 years ago

I'm definitely a +1 on this. It's how we support many things in the Python world, and it'd make sense here.

In Python we're moving to this API:

Client(dsn, transport=TransportClass)