elastic / elastic/apm-agent-java
Extending Error event creation through logging frameworks instrumentation
- Dominant language
- Java
- Stars
- 594
- Forks
- 338
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 25
Description
## Is your feature request related to a problem?
We currently only create error events for logging APIs that accept a `Throwable`. Any error (and fatal) logging event should result with an APM error event.
## Describe the solution you'd like
1. Instrument additional error/fatal logging APIs. The major challenge in doing this is with formatted error messages, which will require special handling for each logging framework. If this turns out too complicated, using the formatted message argument without resolving its format parameters will already be considerable improvement.
2. When such error events get serialized, we would use the [intake API `log` field](https://github.com/elastic/apm-server/blob/main/docs/spec/v2/error.json#L902).
NOTE: even when an error is logged with a `Throwable`, we should populate both the `log` AND the `exception` fields.
Contributor guide
Assessment
This issue has not been assessed yet.