elastic / elastic/apm-agent-python
Logging integration to capture all logged exceptions
- Lingua principale
- Python
- Stelle
- 431
- Fork
- 239
- Merge medio
- 5g 10h
- PR unite (30g)
- 7
Descrizione
**Is your feature request related to a problem? Please describe.**
Instrumenting an existing application can be cumbersome: All places with exception handling need to be extend in order to also forward the errors to APM using `client.capture_exception()`. However, most of the time such code paths are already well covered with `logger.exception(...)` or similar.
**Describe the solution you'd like**
The APM library should offer an opt-in feature to automatically forward all logged exceptions to APM. This could be an automatic feature similar to how HTTP libraries get instrumented.
**Describe alternatives you've considered**
The APM `logging.LoggingHandler` class offers such functionality. However the capturing is hereby bound to a specific output format. It cannot easily be used together with `structlog`
This feature request is inspired by the integration offered by Sentry https://docs.sentry.io/platforms/python/guides/logging/.
**Additional context**
n/a
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.