Skip to content

Commit 3e208fe

Browse files
authored
feat(loguru): Introduce a troubleshooting section (#15580)
Add a Troubleshooting section with common gotchas one might run into when using the Loguru integration. **Preview:** https://sentry-docs-git-ivana-pythonloguru-troubleshooting.sentry.dev/platforms/python/integrations/loguru/ ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [x] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent 431a9be commit 3e208fe

File tree

1 file changed

+14
-0
lines changed
  • docs/platforms/python/integrations/loguru

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,20 @@ sentry_sdk.init(
174174

175175
Default: `ERROR`
176176

177+
## Troubleshooting
178+
179+
<Expandable title="Logs not appearing in Sentry">
180+
181+
First, make sure you have the `enable_logs=True` option in your `sentry_sdk.init()` and you're on the latest version of the SDK.
182+
183+
Your logs could be missing because of the logging level of the logger. The SDK will honor the configured level of each logger. That means that you won't see any `INFO` or `DEBUG` data in Sentry from a logger with the level set to `WARNING`, regardless of how you configure the integration.
184+
185+
It might also be the case that the SDK's Loguru setup is being overwritten in your app. Sentry plugs into Loguru by adding its own handlers when you call `sentry_sdk.init()`. If those handlers are later overridden, for example by calling `logger.configure(handlers=...)`, the integration won't work.
186+
187+
Another reason why you might not be seeing your logs in Sentry is because they were rejected client- or server-side. This could be due to them being too large, or because of reasons like rate limits or backpressure management. In Sentry, you can go to `Settings > Stats & Usage` and select `Logs` from the `Category` dropdown to see what logs were dropped.
188+
189+
</Expandable>
190+
177191
## Supported Versions
178192

179193
- Loguru: 0.5+

0 commit comments

Comments
 (0)