Skip to content

Commit c9290bd

Browse files
docs(python): Clarify how to init SDK in async app (#12854)
1 parent f1bb1dd commit c9290bd

File tree

1 file changed

+4
-3
lines changed
  • docs/platforms/python/integrations/asyncio

1 file changed

+4
-3
lines changed

docs/platforms/python/integrations/asyncio/index.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ pip install --upgrade 'sentry-sdk'
1313

1414
## Configure
1515

16-
Add `AsyncioIntegration()` to your list of `integrations`, enable tracing and be sure to call `sentry_sdk.init()` at the beginning of your async loop:
16+
Add `AsyncioIntegration()` to your list of `integrations`, enable tracing and be sure to call `sentry_sdk.init()` **at the beginning of the first `async` function you call**, as shown in the example below.
1717

18+
<Alert level="warning">
1819

19-
In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/).
20+
If you call `sentry_sdk.init()` outside of an `async` function in an async application, the SDK will not behave as expected.
2021

21-
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
22+
</Alert>
2223

2324
<OnboardingOptionButtons
2425
options={[

0 commit comments

Comments
 (0)