elastic / elastic/apm-agent-python

Logging integration to capture all logged exceptions

Offen
#1,040 5 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
agent-python
Vorherrschende Sprache
Python
Sterne
431
Forks
239
Ø Merge
5 T. 10 Std.
Gemergte PRs (30 T.)
7

Beschreibung

**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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.