elastic / elastic/apm-agent-python
Logging integration to capture all logged exceptions
- 主要言語
- Python
- スター
- 431
- フォーク
- 239
- 平均マージ
- 5日 10時間
- マージ済み PR(30日)
- 7
説明
**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
コントリビューションガイド
調査の方向性
まず既存の APM logging.LoggingHandler と client.capture_exception() のエントリーポイントを読み、要求された動作を structlog の使用方法と比較します。特定の出力形式に依存せず、opt-in の統合によって記録された例外を APM に転送でき、サポートされる logging パスと設定が文書化されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- observability-sre
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100