From 516d04349514c48a8e391af7dbfc5218f79fbf15 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Wed, 26 Feb 2025 15:53:34 +0100 Subject: [PATCH] docs(python): Clarify how to init SDK in `async` app Also, remove the information about tracing and performance; it is not really relevant to the rest of the content on this page, and hovering over the "?" icon on the selection boxes explains what these do. --- docs/platforms/python/integrations/asyncio/index.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/platforms/python/integrations/asyncio/index.mdx b/docs/platforms/python/integrations/asyncio/index.mdx index ccc577b62e5e3..4df20143d69d1 100644 --- a/docs/platforms/python/integrations/asyncio/index.mdx +++ b/docs/platforms/python/integrations/asyncio/index.mdx @@ -13,12 +13,13 @@ pip install --upgrade 'sentry-sdk' ## Configure -Add `AsyncioIntegration()` to your list of `integrations`, enable tracing and be sure to call `sentry_sdk.init()` at the beginning of your async loop: +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. + -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/). +If you call `sentry_sdk.init()` outside of an `async` function in an async application, the SDK will not behave as expected. -Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. +