elastic / elastic/apm-agent-python
Logging integration to capture all logged exceptions
- Lenguaje dominante
- Python
- Estrellas
- 431
- Forks
- 239
- Merge medio
- 5 d 10 h
- PR fusionados (30 d)
- 7
Descripción
**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
Guía de contribución
Línea de trabajo
Empieza leyendo el logging.LoggingHandler existente de APM y el punto de entrada client.capture_exception(), y después compara el comportamiento solicitado con el uso de structlog. Se considera terminado cuando una integración opt-in reenvía las excepciones registradas a APM sin depender de un formato de salida específico, y las rutas de logging compatibles y la configuración están documentadas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- observability-sre
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 30/100