Skip to content

Commit da824e3

Browse files
authored
fix(python): Remove legacy channels section from Troubleshooting (#6266)
1 parent 445e1be commit da824e3

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

src/platforms/python/common/troubleshooting.mdx

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ taken. This is specially true when working with a code base doing concurrency
2929
outside of the provided framework integrations.
3030

3131
The general recommendation is to have one hub per "concurrency unit"
32-
(thread/coroutine/etc). The SDK ensures every thread has an independent hub. If
33-
you do concurrency with `asyncio` coroutines, clone the current hub for use
34-
within a block that runs concurrent code:
32+
(thread/coroutine/etc). The SDK ensures every thread has an independent hub via the `ThreadingIntegration`.
33+
If you do concurrency with `asyncio` coroutines, make sure to use the `AsyncioIntegration`
34+
that will clone the current hub in your `Task`s.
35+
36+
The general pattern of usage for cloning the hub is:
3537

3638
```python
3739
with Hub(Hub.current):
@@ -40,10 +42,6 @@ with Hub(Hub.current):
4042
# the same initial scope data.
4143
```
4244

43-
Issues with `asyncio` have then an easy workaround: every `asyncio` coroutine
44-
that really does run concurrently with other coroutines needs to be made into a
45-
task, then the hub needs to be cloned and reassigned.
46-
4745
See the [Threading](../configuration/integrations/default-integrations/#threading) section
4846
for a more complete example that involves cloning the current hub.
4947

@@ -114,13 +112,3 @@ be fixed from within the SDK.
114112

115113
This [issue has been fixed with gevent 20.5](https://github.com/gevent/gevent/issues/1407) but continues to be one for
116114
eventlet.
117-
118-
<PlatformSection supported={["python.django"]}>
119-
120-
## Django Channels
121-
122-
A Django application using Channels 2.0 will be correctly instrumented under Python 3.7. For older versions of Python, install `aiocontextvars` from PyPI or your application will not start.
123-
124-
If you experience memory leaks in your channels' consumers while using the SDK, you need to wrap your entire application in [Sentry's ASGI middleware](/platforms/python/guides/asgi/). Unfortunately the SDK is not able to do so by itself, as [Channels is missing some hooks for instrumentation](https://github.com/django/channels/issues/1348).
125-
126-
</PlatformSection>

0 commit comments

Comments
 (0)