getsentry / getsentry/sentry-python
Add an `ignore_loggers` kwarg to `LoggingIntegration`
- Lingua principale
- Python
- Stelle
- 2.2k
- Fork
- 669
- Merge medio
- 1g 40m
- PR unite (30g)
- 212
Descrizione
### Problem Statement
It's simply more convenient to have a kwarg for this, instead of having to call `ignore_logger()` multiple times 🙂
### Solution Brainstorm
```python
class LoggingIntegration(Integration):
def __init__(
self,
...,
ignore_loggers=None,
):
...
# --- Either: ---
for logger in ignore_loggers or ():
ignore_logger(logger)
# --- Or: ---
_IGNORED_LOGGERS.update(ignore_loggers or ())
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by locating LoggingIntegration and the existing ignore_logger() entry point, then inspect how _IGNORED_LOGGERS is maintained. Decide which proposed initialization path matches the surrounding design. Done means LoggingIntegration accepts ignore_loggers and registers each supplied logger without changing existing ignore_logger() behavior; run the relevant integration tests if available.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- observability
- Tipo di issue
- Funzionalità
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100