We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support for custom CA bundles
With the Raven client it is possible to [specify a custom CA bundle by appending the `ca_cert` parameter to the DSN](https://docs.sentry.io/clients/python/transports/). This is important for use of the client with on-premise installations of Sentry that use certificates signed by a custom CA. Sadly, [looking at `sentry_sdk.transport._make_pool`](https://github.com/getsentry/sentry-python/blob/30f339db3e76384e23fc951627c689197cb0e7d5/sentry_sdk/transport.py#L26), it seems this value is now hard-coded to `certifi.where()`. In result, users that previously used the `ca_cert` parameter are forced to stay on the Raven client. Thus, it would be great if you could (re-)add this feature.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sentry_sdk/transport.py`
Content:
```
1 from __future__ import print_function
2 
3 import json
4 import io
5 import urllib3
6 import certifi
7 import gzip
8 
9 from datetime import datetime, timedelta
10 
11 from sentry_sdk.consts import VERSION
12 from sentry_sdk.utils import Dsn, logger, capture_internal_exceptions
13 from sentry_sdk.worker import BackgroundWorker
14 
15 try:
16     from urllib.request import getproxies
17 except ImportError:
18     from urllib import getproxies
19 
20 
21 def _make_pool(parsed_dsn, http_proxy, https_proxy):
22     proxy = https_proxy if parsed_dsn == "https" else http_proxy
23     if not proxy:
24         proxy = getproxies().get(parsed_dsn.scheme)
25 
26     opts = {"num_pools": 2, "cert_reqs": "CERT_REQUIRED", "ca_certs": certifi.where()}
27 
28     if proxy:
29         return urllib3.ProxyManager(proxy, **opts)
30     else:
31         return urllib3.PoolManager(**opts)
32 
33 
34 class Transport(object):
35     """Baseclass for all transports.
36 
37     A transport is used to send an event to sentry.
38     """
39 
40     def __init__(self, options=None):
41         self.options = options
42         if options and options["dsn"]:
43             self.parsed_dsn = Dsn(options["dsn"])
44         else:
45             self.parsed_dsn = None
46 
47     def capture_event(self, event):
48         """This gets invoked with the event dictionary when an event should
49         be sent to sentry.
50         """
51         raise NotImplementedError()
52 
53     def shutdown(self, timeout, callback=None):
54         """Initiates a controlled shutdown that should flush out pending
55         events.  The callback must be invoked with the number of pending
56         events and the timeout if the shutting down would take some period
57         of time (eg: not instant).
58         """
59         self.kill()
60 
61     def kill(self):
62         """Forcefully kills the transport."""
63         pass
64 
65     def copy(self):
66         """Copy the transport.
67 
68         The returned transport should behave completely independent from the
69         previous one.  It still may share HTTP connection pools, but not share
70         any state such as internal queues.
71         """
72         return self
73 
74     def __del__(self):
75         try:
76             self.kill()
77         except Exception:
78             pass
79 
80 
81 class HttpTransport(Transport):
82     """The default HTTP transport."""
83 
84     def __init__(self, options):
85         Transport.__init__(self, options)
86         self._worker = BackgroundWorker()
87         self._auth = self.parsed_dsn.to_auth("sentry-python/%s" % VERSION)
88         self._pool = _make_pool(
89             self.parsed_dsn,
90             http_proxy=options["http_proxy"],
91             https_proxy=options["https_proxy"],
92         )
93         self._disabled_until = None
94         self._retry = urllib3.util.Retry()
95         self.options = options
96 
97         from sentry_sdk import Hub
98 
99         self.hub_cls = Hub
100 
101     def _send_event(self, event):
102         if self._disabled_until is not None:
103             if datetime.utcnow() < self._disabled_until:
104                 return
105             self._disabled_until = None
106 
107         body = io.BytesIO()
108         with gzip.GzipFile(fileobj=body, mode="w") as f:
109             f.write(json.dumps(event).encode("utf-8"))
110 
111         logger.debug(
112             "Sending %s event [%s] to %s project:%s"
113             % (
114                 event.get("level") or "error",
115                 event["event_id"],
116                 self.parsed_dsn.host,
117                 self.parsed_dsn.project_id,
118             )
119         )
120         response = self._pool.request(
121             "POST",
122             str(self._auth.store_api_url),
123             body=body.getvalue(),
124             headers={
125                 "X-Sentry-Auth": str(self._auth.to_header()),
126                 "Content-Type": "application/json",
127                 "Content-Encoding": "gzip",
128             },
129         )
130 
131         try:
132             if response.status == 429:
133                 self._disabled_until = datetime.utcnow() + timedelta(
134                     seconds=self._retry.get_retry_after(response)
135                 )
136                 return
137 
138             elif response.status >= 300 or response.status < 200:
139                 raise ValueError("Unexpected status code: %s" % response.status)
140         finally:
141             response.close()
142 
143         self._disabled_until = None
144 
145     def capture_event(self, event):
146         hub = self.hub_cls.current
147 
148         def send_event_wrapper():
149             with hub:
150                 with capture_internal_exceptions():
151                     self._send_event(event)
152 
153         self._worker.submit(send_event_wrapper)
154 
155     def shutdown(self, timeout, callback=None):
156         logger.debug("Shutting down HTTP transport orderly")
157         if timeout <= 0:
158             self._worker.kill()
159         else:
160             self._worker.shutdown(timeout, callback)
161 
162     def kill(self):
163         logger.debug("Killing HTTP transport")
164         self._worker.kill()
165 
166     def copy(self):
167         transport = type(self)(self.options)
168         transport._pool = self._pool
169         return transport
170 
171 
172 class _FunctionTransport(Transport):
173     def __init__(self, func):
174         Transport.__init__(self)
175         self._func = func
176 
177     def capture_event(self, event):
178         self._func(event)
179 
180 
181 def make_transport(options):
182     ref_transport = options["transport"]
183 
184     # If no transport is given, we use the http transport class
185     if ref_transport is None:
186         transport_cls = HttpTransport
187     else:
188         try:
189             issubclass(ref_transport, type)
190         except TypeError:
191             # if we are not a class but we are a callable, assume a
192             # function that acts as capture_event
193             if callable(ref_transport):
194                 return _FunctionTransport(ref_transport)
195             # otherwise assume an object fulfilling the transport contract
196             return ref_transport
197         transport_cls = ref_transport
198 
199     # if a transport class is given only instanciate it if the dsn is not
200     # empty or None
201     if options["dsn"]:
202         return transport_cls(options)
203
```

Path: `sentry_sdk/consts.py`
Content:
```
1 import socket
2 
3 
4 VERSION = "0.5.4"
5 DEFAULT_SERVER_NAME = socket.gethostname() if hasattr(socket, "gethostname") else None
6 DEFAULT_OPTIONS = {
7     "dsn": None,
8     "with_locals": True,
9     "max_breadcrumbs": 100,
10     "release": None,
11     "environment": None,
12     "server_name": DEFAULT_SERVER_NAME,
13     "shutdown_timeout": 2.0,
14     "integrations": [],
15     "in_app_include": [],
16     "in_app_exclude": [],
17     "default_integrations": True,
18     "dist": None,
19     "transport": None,
20     "sample_rate": 1.0,
21     "send_default_pii": False,
22     "http_proxy": None,
23     "https_proxy": None,
24     "ignore_errors": [],
25     "request_bodies": "medium",
26     "before_send": None,
27     "before_breadcrumb": None,
28     "debug": False,
29     "attach_stacktrace": False,
30 }
31 
32 
33 SDK_INFO = {
34     "name": "sentry.python",
35     "version": VERSION,
36     "packages": [{"name": "pypi:sentry-sdk", "version": VERSION}],
37 }
38
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/sentry_sdk/consts.py b/sentry_sdk/consts.py
--- a/sentry_sdk/consts.py
+++ b/sentry_sdk/consts.py
@@ -27,6 +27,7 @@
     "before_breadcrumb": None,
     "debug": False,
     "attach_stacktrace": False,
+    "ca_certs": None,
 }
 
 
diff --git a/sentry_sdk/transport.py b/sentry_sdk/transport.py
--- a/sentry_sdk/transport.py
+++ b/sentry_sdk/transport.py
@@ -18,12 +18,16 @@
     from urllib import getproxies
 
 
-def _make_pool(parsed_dsn, http_proxy, https_proxy):
+def _make_pool(parsed_dsn, http_proxy, https_proxy, ca_certs):
     proxy = https_proxy if parsed_dsn == "https" else http_proxy
     if not proxy:
         proxy = getproxies().get(parsed_dsn.scheme)
 
-    opts = {"num_pools": 2, "cert_reqs": "CERT_REQUIRED", "ca_certs": certifi.where()}
+    opts = {
+        "num_pools": 2,
+        "cert_reqs": "CERT_REQUIRED",
+        "ca_certs": ca_certs or certifi.where(),
+    }
 
     if proxy:
         return urllib3.ProxyManager(proxy, **opts)
@@ -89,6 +93,7 @@
             self.parsed_dsn,
             http_proxy=options["http_proxy"],
             https_proxy=options["https_proxy"],
+            ca_certs=options["ca_certs"],
         )
         self._disabled_until = None
         self._retry = urllib3.util.Retry()

{"golden_diff": "diff --git a/sentry_sdk/consts.py b/sentry_sdk/consts.py\n--- a/sentry_sdk/consts.py\n+++ b/sentry_sdk/consts.py\n@@ -27,6 +27,7 @@\n     \"before_breadcrumb\": None,\n     \"debug\": False,\n     \"attach_stacktrace\": False,\n+    \"ca_certs\": None,\n }\n \n \ndiff --git a/sentry_sdk/transport.py b/sentry_sdk/transport.py\n--- a/sentry_sdk/transport.py\n+++ b/sentry_sdk/transport.py\n@@ -18,12 +18,16 @@\n     from urllib import getproxies\n \n \n-def _make_pool(parsed_dsn, http_proxy, https_proxy):\n+def _make_pool(parsed_dsn, http_proxy, https_proxy, ca_certs):\n     proxy = https_proxy if parsed_dsn == \"https\" else http_proxy\n     if not proxy:\n         proxy = getproxies().get(parsed_dsn.scheme)\n \n-    opts = {\"num_pools\": 2, \"cert_reqs\": \"CERT_REQUIRED\", \"ca_certs\": certifi.where()}\n+    opts = {\n+        \"num_pools\": 2,\n+        \"cert_reqs\": \"CERT_REQUIRED\",\n+        \"ca_certs\": ca_certs or certifi.where(),\n+    }\n \n     if proxy:\n         return urllib3.ProxyManager(proxy, **opts)\n@@ -89,6 +93,7 @@\n             self.parsed_dsn,\n             http_proxy=options[\"http_proxy\"],\n             https_proxy=options[\"https_proxy\"],\n+            ca_certs=options[\"ca_certs\"],\n         )\n         self._disabled_until = None\n         self._retry = urllib3.util.Retry()\n", "issue": "Support for custom CA bundles\nWith the Raven client it is possible to [specify a custom CA bundle by appending the `ca_cert` parameter to the DSN](https://docs.sentry.io/clients/python/transports/). This is important for use of the client with on-premise installations of Sentry that use certificates signed by a custom CA. Sadly, [looking at `sentry_sdk.transport._make_pool`](https://github.com/getsentry/sentry-python/blob/30f339db3e76384e23fc951627c689197cb0e7d5/sentry_sdk/transport.py#L26), it seems this value is now hard-coded to `certifi.where()`. In result, users that previously used the `ca_cert` parameter are forced to stay on the Raven client. Thus, it would be great if you could (re-)add this feature.\n", "before_files": [{"content": "from __future__ import print_function\n\nimport json\nimport io\nimport urllib3\nimport certifi\nimport gzip\n\nfrom datetime import datetime, timedelta\n\nfrom sentry_sdk.consts import VERSION\nfrom sentry_sdk.utils import Dsn, logger, capture_internal_exceptions\nfrom sentry_sdk.worker import BackgroundWorker\n\ntry:\n    from urllib.request import getproxies\nexcept ImportError:\n    from urllib import getproxies\n\n\ndef _make_pool(parsed_dsn, http_proxy, https_proxy):\n    proxy = https_proxy if parsed_dsn == \"https\" else http_proxy\n    if not proxy:\n        proxy = getproxies().get(parsed_dsn.scheme)\n\n    opts = {\"num_pools\": 2, \"cert_reqs\": \"CERT_REQUIRED\", \"ca_certs\": certifi.where()}\n\n    if proxy:\n        return urllib3.ProxyManager(proxy, **opts)\n    else:\n        return urllib3.PoolManager(**opts)\n\n\nclass Transport(object):\n    \"\"\"Baseclass for all transports.\n\n    A transport is used to send an event to sentry.\n    \"\"\"\n\n    def __init__(self, options=None):\n        self.options = options\n        if options and options[\"dsn\"]:\n            self.parsed_dsn = Dsn(options[\"dsn\"])\n        else:\n            self.parsed_dsn = None\n\n    def capture_event(self, event):\n        \"\"\"This gets invoked with the event dictionary when an event should\n        be sent to sentry.\n        \"\"\"\n        raise NotImplementedError()\n\n    def shutdown(self, timeout, callback=None):\n        \"\"\"Initiates a controlled shutdown that should flush out pending\n        events.  The callback must be invoked with the number of pending\n        events and the timeout if the shutting down would take some period\n        of time (eg: not instant).\n        \"\"\"\n        self.kill()\n\n    def kill(self):\n        \"\"\"Forcefully kills the transport.\"\"\"\n        pass\n\n    def copy(self):\n        \"\"\"Copy the transport.\n\n        The returned transport should behave completely independent from the\n        previous one.  It still may share HTTP connection pools, but not share\n        any state such as internal queues.\n        \"\"\"\n        return self\n\n    def __del__(self):\n        try:\n            self.kill()\n        except Exception:\n            pass\n\n\nclass HttpTransport(Transport):\n    \"\"\"The default HTTP transport.\"\"\"\n\n    def __init__(self, options):\n        Transport.__init__(self, options)\n        self._worker = BackgroundWorker()\n        self._auth = self.parsed_dsn.to_auth(\"sentry-python/%s\" % VERSION)\n        self._pool = _make_pool(\n            self.parsed_dsn,\n            http_proxy=options[\"http_proxy\"],\n            https_proxy=options[\"https_proxy\"],\n        )\n        self._disabled_until = None\n        self._retry = urllib3.util.Retry()\n        self.options = options\n\n        from sentry_sdk import Hub\n\n        self.hub_cls = Hub\n\n    def _send_event(self, event):\n        if self._disabled_until is not None:\n            if datetime.utcnow() < self._disabled_until:\n                return\n            self._disabled_until = None\n\n        body = io.BytesIO()\n        with gzip.GzipFile(fileobj=body, mode=\"w\") as f:\n            f.write(json.dumps(event).encode(\"utf-8\"))\n\n        logger.debug(\n            \"Sending %s event [%s] to %s project:%s\"\n            % (\n                event.get(\"level\") or \"error\",\n                event[\"event_id\"],\n                self.parsed_dsn.host,\n                self.parsed_dsn.project_id,\n            )\n        )\n        response = self._pool.request(\n            \"POST\",\n            str(self._auth.store_api_url),\n            body=body.getvalue(),\n            headers={\n                \"X-Sentry-Auth\": str(self._auth.to_header()),\n                \"Content-Type\": \"application/json\",\n                \"Content-Encoding\": \"gzip\",\n            },\n        )\n\n        try:\n            if response.status == 429:\n                self._disabled_until = datetime.utcnow() + timedelta(\n                    seconds=self._retry.get_retry_after(response)\n                )\n                return\n\n            elif response.status >= 300 or response.status < 200:\n                raise ValueError(\"Unexpected status code: %s\" % response.status)\n        finally:\n            response.close()\n\n        self._disabled_until = None\n\n    def capture_event(self, event):\n        hub = self.hub_cls.current\n\n        def send_event_wrapper():\n            with hub:\n                with capture_internal_exceptions():\n                    self._send_event(event)\n\n        self._worker.submit(send_event_wrapper)\n\n    def shutdown(self, timeout, callback=None):\n        logger.debug(\"Shutting down HTTP transport orderly\")\n        if timeout <= 0:\n            self._worker.kill()\n        else:\n            self._worker.shutdown(timeout, callback)\n\n    def kill(self):\n        logger.debug(\"Killing HTTP transport\")\n        self._worker.kill()\n\n    def copy(self):\n        transport = type(self)(self.options)\n        transport._pool = self._pool\n        return transport\n\n\nclass _FunctionTransport(Transport):\n    def __init__(self, func):\n        Transport.__init__(self)\n        self._func = func\n\n    def capture_event(self, event):\n        self._func(event)\n\n\ndef make_transport(options):\n    ref_transport = options[\"transport\"]\n\n    # If no transport is given, we use the http transport class\n    if ref_transport is None:\n        transport_cls = HttpTransport\n    else:\n        try:\n            issubclass(ref_transport, type)\n        except TypeError:\n            # if we are not a class but we are a callable, assume a\n            # function that acts as capture_event\n            if callable(ref_transport):\n                return _FunctionTransport(ref_transport)\n            # otherwise assume an object fulfilling the transport contract\n            return ref_transport\n        transport_cls = ref_transport\n\n    # if a transport class is given only instanciate it if the dsn is not\n    # empty or None\n    if options[\"dsn\"]:\n        return transport_cls(options)\n", "path": "sentry_sdk/transport.py"}, {"content": "import socket\n\n\nVERSION = \"0.5.4\"\nDEFAULT_SERVER_NAME = socket.gethostname() if hasattr(socket, \"gethostname\") else None\nDEFAULT_OPTIONS = {\n    \"dsn\": None,\n    \"with_locals\": True,\n    \"max_breadcrumbs\": 100,\n    \"release\": None,\n    \"environment\": None,\n    \"server_name\": DEFAULT_SERVER_NAME,\n    \"shutdown_timeout\": 2.0,\n    \"integrations\": [],\n    \"in_app_include\": [],\n    \"in_app_exclude\": [],\n    \"default_integrations\": True,\n    \"dist\": None,\n    \"transport\": None,\n    \"sample_rate\": 1.0,\n    \"send_default_pii\": False,\n    \"http_proxy\": None,\n    \"https_proxy\": None,\n    \"ignore_errors\": [],\n    \"request_bodies\": \"medium\",\n    \"before_send\": None,\n    \"before_breadcrumb\": None,\n    \"debug\": False,\n    \"attach_stacktrace\": False,\n}\n\n\nSDK_INFO = {\n    \"name\": \"sentry.python\",\n    \"version\": VERSION,\n    \"packages\": [{\"name\": \"pypi:sentry-sdk\", \"version\": VERSION}],\n}\n", "path": "sentry_sdk/consts.py"}], "after_files": [{"content": "from __future__ import print_function\n\nimport json\nimport io\nimport urllib3\nimport certifi\nimport gzip\n\nfrom datetime import datetime, timedelta\n\nfrom sentry_sdk.consts import VERSION\nfrom sentry_sdk.utils import Dsn, logger, capture_internal_exceptions\nfrom sentry_sdk.worker import BackgroundWorker\n\ntry:\n    from urllib.request import getproxies\nexcept ImportError:\n    from urllib import getproxies\n\n\ndef _make_pool(parsed_dsn, http_proxy, https_proxy, ca_certs):\n    proxy = https_proxy if parsed_dsn == \"https\" else http_proxy\n    if not proxy:\n        proxy = getproxies().get(parsed_dsn.scheme)\n\n    opts = {\n        \"num_pools\": 2,\n        \"cert_reqs\": \"CERT_REQUIRED\",\n        \"ca_certs\": ca_certs or certifi.where(),\n    }\n\n    if proxy:\n        return urllib3.ProxyManager(proxy, **opts)\n    else:\n        return urllib3.PoolManager(**opts)\n\n\nclass Transport(object):\n    \"\"\"Baseclass for all transports.\n\n    A transport is used to send an event to sentry.\n    \"\"\"\n\n    def __init__(self, options=None):\n        self.options = options\n        if options and options[\"dsn\"]:\n            self.parsed_dsn = Dsn(options[\"dsn\"])\n        else:\n            self.parsed_dsn = None\n\n    def capture_event(self, event):\n        \"\"\"This gets invoked with the event dictionary when an event should\n        be sent to sentry.\n        \"\"\"\n        raise NotImplementedError()\n\n    def shutdown(self, timeout, callback=None):\n        \"\"\"Initiates a controlled shutdown that should flush out pending\n        events.  The callback must be invoked with the number of pending\n        events and the timeout if the shutting down would take some period\n        of time (eg: not instant).\n        \"\"\"\n        self.kill()\n\n    def kill(self):\n        \"\"\"Forcefully kills the transport.\"\"\"\n        pass\n\n    def copy(self):\n        \"\"\"Copy the transport.\n\n        The returned transport should behave completely independent from the\n        previous one.  It still may share HTTP connection pools, but not share\n        any state such as internal queues.\n        \"\"\"\n        return self\n\n    def __del__(self):\n        try:\n            self.kill()\n        except Exception:\n            pass\n\n\nclass HttpTransport(Transport):\n    \"\"\"The default HTTP transport.\"\"\"\n\n    def __init__(self, options):\n        Transport.__init__(self, options)\n        self._worker = BackgroundWorker()\n        self._auth = self.parsed_dsn.to_auth(\"sentry-python/%s\" % VERSION)\n        self._pool = _make_pool(\n            self.parsed_dsn,\n            http_proxy=options[\"http_proxy\"],\n            https_proxy=options[\"https_proxy\"],\n            ca_certs=options[\"ca_certs\"],\n        )\n        self._disabled_until = None\n        self._retry = urllib3.util.Retry()\n        self.options = options\n\n        from sentry_sdk import Hub\n\n        self.hub_cls = Hub\n\n    def _send_event(self, event):\n        if self._disabled_until is not None:\n            if datetime.utcnow() < self._disabled_until:\n                return\n            self._disabled_until = None\n\n        body = io.BytesIO()\n        with gzip.GzipFile(fileobj=body, mode=\"w\") as f:\n            f.write(json.dumps(event).encode(\"utf-8\"))\n\n        logger.debug(\n            \"Sending %s event [%s] to %s project:%s\"\n            % (\n                event.get(\"level\") or \"error\",\n                event[\"event_id\"],\n                self.parsed_dsn.host,\n                self.parsed_dsn.project_id,\n            )\n        )\n        response = self._pool.request(\n            \"POST\",\n            str(self._auth.store_api_url),\n            body=body.getvalue(),\n            headers={\n                \"X-Sentry-Auth\": str(self._auth.to_header()),\n                \"Content-Type\": \"application/json\",\n                \"Content-Encoding\": \"gzip\",\n            },\n        )\n\n        try:\n            if response.status == 429:\n                self._disabled_until = datetime.utcnow() + timedelta(\n                    seconds=self._retry.get_retry_after(response)\n                )\n                return\n\n            elif response.status >= 300 or response.status < 200:\n                raise ValueError(\"Unexpected status code: %s\" % response.status)\n        finally:\n            response.close()\n\n        self._disabled_until = None\n\n    def capture_event(self, event):\n        hub = self.hub_cls.current\n\n        def send_event_wrapper():\n            with hub:\n                with capture_internal_exceptions():\n                    self._send_event(event)\n\n        self._worker.submit(send_event_wrapper)\n\n    def shutdown(self, timeout, callback=None):\n        logger.debug(\"Shutting down HTTP transport orderly\")\n        if timeout <= 0:\n            self._worker.kill()\n        else:\n            self._worker.shutdown(timeout, callback)\n\n    def kill(self):\n        logger.debug(\"Killing HTTP transport\")\n        self._worker.kill()\n\n    def copy(self):\n        transport = type(self)(self.options)\n        transport._pool = self._pool\n        return transport\n\n\nclass _FunctionTransport(Transport):\n    def __init__(self, func):\n        Transport.__init__(self)\n        self._func = func\n\n    def capture_event(self, event):\n        self._func(event)\n\n\ndef make_transport(options):\n    ref_transport = options[\"transport\"]\n\n    # If no transport is given, we use the http transport class\n    if ref_transport is None:\n        transport_cls = HttpTransport\n    else:\n        try:\n            issubclass(ref_transport, type)\n        except TypeError:\n            # if we are not a class but we are a callable, assume a\n            # function that acts as capture_event\n            if callable(ref_transport):\n                return _FunctionTransport(ref_transport)\n            # otherwise assume an object fulfilling the transport contract\n            return ref_transport\n        transport_cls = ref_transport\n\n    # if a transport class is given only instanciate it if the dsn is not\n    # empty or None\n    if options[\"dsn\"]:\n        return transport_cls(options)\n", "path": "sentry_sdk/transport.py"}, {"content": "import socket\n\n\nVERSION = \"0.5.4\"\nDEFAULT_SERVER_NAME = socket.gethostname() if hasattr(socket, \"gethostname\") else None\nDEFAULT_OPTIONS = {\n    \"dsn\": None,\n    \"with_locals\": True,\n    \"max_breadcrumbs\": 100,\n    \"release\": None,\n    \"environment\": None,\n    \"server_name\": DEFAULT_SERVER_NAME,\n    \"shutdown_timeout\": 2.0,\n    \"integrations\": [],\n    \"in_app_include\": [],\n    \"in_app_exclude\": [],\n    \"default_integrations\": True,\n    \"dist\": None,\n    \"transport\": None,\n    \"sample_rate\": 1.0,\n    \"send_default_pii\": False,\n    \"http_proxy\": None,\n    \"https_proxy\": None,\n    \"ignore_errors\": [],\n    \"request_bodies\": \"medium\",\n    \"before_send\": None,\n    \"before_breadcrumb\": None,\n    \"debug\": False,\n    \"attach_stacktrace\": False,\n    \"ca_certs\": None,\n}\n\n\nSDK_INFO = {\n    \"name\": \"sentry.python\",\n    \"version\": VERSION,\n    \"packages\": [{\"name\": \"pypi:sentry-sdk\", \"version\": VERSION}],\n}\n", "path": "sentry_sdk/consts.py"}]}